Add generic arch include header
authorJens Axboe <jens.axboe@oracle.com>
Mon, 21 Dec 2009 12:30:31 +0000 (13:30 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 21 Dec 2009 12:30:31 +0000 (13:30 +0100)
For a newer glibc, this should work (as we don't need private
splice defines, for instance).

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
arch/arch-generic.h [new file with mode: 0644]
arch/arch.h

diff --git a/arch/arch-generic.h b/arch/arch-generic.h
new file mode 100644 (file)
index 0000000..c7b0ca0
--- /dev/null
@@ -0,0 +1,10 @@
+#ifndef ARCH_GENERIC_H
+#define ARCH_GENERIC_H
+
+#define ARCH   (arch_generic)
+
+#define nop                    do { } while (0)
+#define read_barrier()         __asm__ __volatile__("": : :"memory")
+#define write_barrier()                __asm__ __volatile__("": : :"memory")
+
+#endif
index 9f2a566..0ad7b6e 100644 (file)
@@ -17,6 +17,8 @@ enum {
        arch_sparc,
        arch_sparc64,
        arch_arm,
+
+       arch_generic,
 };
 
 #if defined(__i386__)
@@ -40,7 +42,8 @@ enum {
 #elif defined(__mips__) || defined(__mips64__)
 #include "arch-mips.h"
 #else
-#error "Unsupported arch"
+#warning "Unknown architecture, attempting to use generic model."
+#include "arch-generic.h"
 #endif
 
 #ifdef ARCH_HAVE_FFZ