6 #include "../lib/types.h"
35 extern unsigned long arch_flags;
37 #define ARCH_CPU_CLOCK_WRAPS
39 #define atomic_add(p, v) \
40 atomic_fetch_add((_Atomic typeof(*(p)) *)(p), v)
41 #define atomic_sub(p, v) \
42 atomic_fetch_sub((_Atomic typeof(*(p)) *)(p), v)
43 #define atomic_load_relaxed(p) \
44 atomic_load_explicit((_Atomic typeof(*(p)) *)(p), \
46 #define atomic_load_acquire(p) \
47 atomic_load_explicit((_Atomic typeof(*(p)) *)(p), \
49 #define atomic_store_release(p, v) \
50 atomic_store_explicit((_Atomic typeof(*(p)) *)(p), (v), \
53 /* IWYU pragma: begin_exports */
56 #elif defined(__x86_64__)
57 #include "arch-x86_64.h"
58 #elif defined(__powerpc__) || defined(__powerpc64__) || defined(__ppc__)
60 #elif defined(__ia64__)
61 #include "arch-ia64.h"
62 #elif defined(__alpha__)
63 #include "arch-alpha.h"
64 #elif defined(__s390x__) || defined(__s390__)
65 #include "arch-s390.h"
66 #elif defined(__sparc__)
67 #include "arch-sparc.h"
68 #elif defined(__sparc64__)
69 #include "arch-sparc64.h"
70 #elif defined(__arm__)
72 #elif defined(__mips__) || defined(__mips64__)
73 #include "arch-mips.h"
76 #elif defined(__hppa__)
77 #include "arch-hppa.h"
78 #elif defined(__aarch64__)
79 #include "arch-aarch64.h"
81 #warning "Unknown architecture, attempting to use generic model."
82 #include "arch-generic.h"
85 #include "../lib/ffz.h"
86 /* IWYU pragma: end_exports */
88 #ifndef ARCH_HAVE_INIT
89 static inline int arch_init(char *envp[])
97 * alpha is the only exception, all other architectures
98 * have common numbers for new system calls.
100 # ifndef __NR_io_uring_setup
101 # define __NR_io_uring_setup 535
103 # ifndef __NR_io_uring_enter
104 # define __NR_io_uring_enter 536
106 # ifndef __NR_io_uring_register
107 # define __NR_io_uring_register 537
109 #else /* !__alpha__ */
110 # ifndef __NR_io_uring_setup
111 # define __NR_io_uring_setup 425
113 # ifndef __NR_io_uring_enter
114 # define __NR_io_uring_enter 426
116 # ifndef __NR_io_uring_register
117 # define __NR_io_uring_register 427
121 #define ARCH_HAVE_IOURING