patch-2.4.2 linux/include/asm-cris/unaligned.h

Next file: linux/include/asm-cris/unistd.h
Previous file: linux/include/asm-cris/ucontext.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.1/linux/include/asm-cris/unaligned.h linux/include/asm-cris/unaligned.h
@@ -0,0 +1,16 @@
+#ifndef __CRIS_UNALIGNED_H
+#define __CRIS_UNALIGNED_H
+
+/*
+ * CRIS 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 (who was at: slshen@lbl.gov)