First USB sketch.
[cascardo/kernel/slides/.git] / 03types / types
index f8290fe..da8a825 100644 (file)
@@ -55,14 +55,16 @@ Reference:
 
 # Little endian and Big endian
 
-* FIXME
 * Little endian machines
+       - Alpha
        - x86
 * Big endian machines
+       - PowerPC
        - SPARC
-       - MIPS
 * Multi-endian machines
        - ARM
+       - MIPS
+       - SH
 
 # Headers
 
@@ -111,6 +113,68 @@ Reference:
 
 # Bitmaps
 
-# Trees and hashes
+# Declaration
+
+* include linux/types.h
+* include linux/bitops.h
+* DECLARE\\_BITMAP
+
+# API
+
+* All atomic, prefix \\_ to use non-atomic
+* set\\_bit
+* clear\\_bit
+* change\\_bit
+* test\\_and\\_set\\_bit
+* test\\_and\\_clear\\_bit
+* test\\_and\\_change\\_bit
+
+# Lookup
+
+* find\\_first\\_bit
+* find\\_first\\_zero\\_bit
+* find\\_last\\_bit
+* find\\_next\\_bit
+* find\\_next\\_zero\\_bit
+* for\\_each\\_set\\_bit
+
+# Reb-black tree
+
+# Files
+
+* Documentation/rbtree.txt
+* lib/rbtree.c
+* include linux/rbtree.h
+
+# Usage
+
+* Embed struct rb\\_node into your data structure
+* There's no callback for comparison, write your own lookup and insertion
+  functions
+* Locking is up to the user
+
+# API
+
+* rb\\_entry is the same as container\\_of
+* Create the root with struct rb\\_root name = RB\\_ROOT;
+* Lookup function (see example) uses rb\\_left and rb\\_right members
+* Insertion: lookup insertion point, save the parent and use the functions
+  rb\\_link\\_node and rb\\_insert\\_color (example in Documentation)
+* Erase with rb\\_erase
+* Iterate with functions rb\\_first, rb\\_last, rb\\_next and rb\\_prev
+
+# Hashes
+
+* No hash table
+* There are hash functions found at
+       - include linux/hash.h
+       - include linux/jhash.h
+* Users usually do chaining to resolve collisions
 
 # Other data types
+
+* IDR
+* Flexible Array
+* Plist
+* Radix tree
+* Btree