Basic types, endianness and lists.
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Sun, 16 May 2010 17:20:48 +0000 (14:20 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Sun, 16 May 2010 17:20:48 +0000 (14:20 -0300)
03types/types

index 3102753..80a0e4e 100644 (file)
@@ -45,10 +45,69 @@ Reference:
   a lock
 * Must serialize getting a ref without a valid pointer with putting a ref
 
+# Basic Types
+
+* include linux/types.h
+* sXX, where XX is 8, 16, 32 or 64
+* uXX
+
 # Endianness
 
+# Little endian and Big endian
+
+* FIXME
+* Little endian machines
+       - x86
+* Big endian machines
+       - SPARC
+       - MIPS
+* Multi-endian machines
+       - ARM
+
+# Headers
+
+* include asm/byteorder.h
+* include/linux/byteorder/generic.h
+
+# Macros
+
+* cpu\\_to\\_beXX
+* cpu\\_to\\_leXX
+* beXX\\_to\\_cpu
+* leXX\\_to\\_cpu
+* All those with suffix p - use a pointer
+* All those with suffix s - change in situ
+
 # Lists
 
+# Declaration
+
+* LIST\\_HEAD(head);
+* Embed a struct list\\_head in your structure
+* Use a struct list\\_head pointer to iterate
+
+# Initialization
+
+* INIT\\_LIST\\_HEAD - receives a pointer to the embedded list head
+
+# Operations
+
+* list\\_add - receives a pointer to the element and a head
+* list\\_add\\_tail
+* list\\_del - receives only the pointer to the element
+* list\\_empty
+
+# Access
+
+* list\\_entry(entry, type, member); -- uses container\\_of
+* list\\_first\\_entry(head, type, member);
+
+# Iteration macros
+
+* list\\_for\\_each(lhptr, head);
+* list\\_for\\_each\\_entry(iptr, head, member)
+* list\\_for\\_each\\_safe(lhptr, head);
+
 # Bitmaps
 
 # Trees and hashes