patch-pre2.0.6 linux/include/asm-i386/unaligned.h

Next file: linux/include/linux/affs_fs.h
Previous file: linux/include/asm-generic/unaligned.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.5/linux/include/asm-i386/unaligned.h linux/include/asm-i386/unaligned.h
@@ -0,0 +1,16 @@
+#ifndef __I386_UNALIGNED_H
+#define __I386_UNALIGNED_H
+
+/*
+ * The i386 can do unaligned accesses itself. 
+ *
+ * The strange macros are there to make sure these can't
+ * be misused in a way that makes them not work on other
+ * architectures where unaligned accesses aren't as simple.
+ */
+
+#define get_unaligned(ptr) (*(ptr))
+
+#define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))
+
+#endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this