patch-2.4.5 linux/include/asm-i386/unaligned.h
Next file: linux/include/asm-ia64/pci.h
Previous file: linux/include/asm-i386/system.h
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Tue May 22 10:23:16 2001
- Orig file:
v2.4.4/linux/include/asm-i386/unaligned.h
- Orig date:
Sun May 19 05:47:57 1996
diff -u --recursive --new-file v2.4.4/linux/include/asm-i386/unaligned.h linux/include/asm-i386/unaligned.h
@@ -9,8 +9,29 @@
* architectures where unaligned accesses aren't as simple.
*/
+/**
+ * get_unaligned - get value from possibly mis-aligned location
+ * @ptr: pointer to value
+ *
+ * This macro should be used for accessing values larger in size than
+ * single bytes at locations that are expected to be improperly aligned,
+ * e.g. retrieving a u16 value from a location not u16-aligned.
+ *
+ * Note that unaligned accesses can be very expensive on some architectures.
+ */
#define get_unaligned(ptr) (*(ptr))
+/**
+ * put_unaligned - put value to a possibly mis-aligned location
+ * @val: value to place
+ * @ptr: pointer to location
+ *
+ * This macro should be used for placing values larger in size than
+ * single bytes at locations that are expected to be improperly aligned,
+ * e.g. writing a u16 value to a location not u16-aligned.
+ *
+ * Note that unaligned accesses can be very expensive on some architectures.
+ */
#define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)