patch-2.2.14 linux/include/asm-s390/unaligned.h

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

diff -u --recursive --new-file v2.2.13/linux/include/asm-s390/unaligned.h linux/include/asm-s390/unaligned.h
@@ -0,0 +1,24 @@
+/*
+ *  include/asm-s390/unaligned.h
+ *
+ *  S390 version
+ *
+ *  Derived from "include/asm-i386/unaligned.h"
+ */
+
+#ifndef __S390_UNALIGNED_H
+#define __S390_UNALIGNED_H
+
+/*
+ * The S390 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)