Revert "Remove unused define"
[fio.git] / arch / arch.h
1 #ifndef ARCH_H
2 #define ARCH_H
3
4 enum {
5         arch_x86_64,
6         arch_i386,
7         arch_ppc,
8         arch_ia64,
9         arch_s390,
10         arch_alpha,
11         arch_sparc,
12         arch_sparc64,
13 };
14
15 #if defined(__i386__)
16 #include "arch-x86.h"
17 #elif defined(__x86_64__)
18 #include "arch-x86_64.h"
19 #elif defined(__powerpc__) || defined(__powerpc64__)
20 #include "arch-ppc.h"
21 #elif defined(__ia64__)
22 #include "arch-ia64.h"
23 #elif defined(__alpha__)
24 #include "arch-alpha.h"
25 #elif defined(__s390x__) || defined(__s390__)
26 #include "arch-s390.h"
27 #elif defined(__sparc__)
28 #include "arch-sparc.h"
29 #elif defined(__sparc64__)
30 #include "arch-sparc64.h"
31 #else
32 #error "Unsupported arch"
33 #endif
34
35 #ifdef ARCH_HAVE_FFZ
36 #define ffz(bitmask)    arch_ffz(bitmask)
37 #else
38 #include "../lib/ffz.h"
39 #endif
40
41 static inline void spin_lock_init(spinlock_t *lock)
42 {
43         lock->lock = 0;
44 }
45
46 #endif