summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-01-13 11:03:04 -0700
committerJens Axboe <axboe@kernel.dk>2019-01-13 11:03:04 -0700
commit89167b457f5678fd8fae0696d616cef5e3a3c379 (patch)
tree49e9526d3f231b3547d5d50a3e01a4f8843eb3f7 /src
parent4fe9645fa4753a62ef225cc390baed40dfc50f8c (diff)
downloadliburing-89167b457f5678fd8fae0696d616cef5e3a3c379.tar.gz
liburing-89167b457f5678fd8fae0696d616cef5e3a3c379.tar.bz2
Add x86 32-bit support
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'src')
-rw-r--r--src/barrier.h3
-rw-r--r--src/syscall.c10
2 files changed, 13 insertions, 0 deletions
diff --git a/src/barrier.h b/src/barrier.h
index 0fd5c39..2076c1c 100644
--- a/src/barrier.h
+++ b/src/barrier.h
@@ -4,6 +4,9 @@
#if defined(__x86_64)
#define read_barrier() __asm__ __volatile__("lfence":::"memory")
#define write_barrier() __asm__ __volatile__("sfence":::"memory")
+#elif defined(__i386__)
+#define read_barrier() __asm__ __volatile__("": : :"memory")
+#define write_barrier() __asm__ __volatile__("": : :"memory")
#else
/*
* Add arch appropriate definitions. Be safe and use full barriers for
diff --git a/src/syscall.c b/src/syscall.c
index 6347244..a625b47 100644
--- a/src/syscall.c
+++ b/src/syscall.c
@@ -16,6 +16,16 @@
#ifndef __NR_sys_io_uring_register
#define __NR_sys_io_uring_register 337
#endif
+#elif defined(__i386__)
+#ifndef __NR_sys_io_uring_setup
+#define __NR_sys_io_uring_setup 387
+#endif
+#ifndef __NR_sys_io_uring_enter
+#define __NR_sys_io_uring_enter 388
+#endif
+#ifndef __NR_sys_io_uring_register
+#define __NR_sys_io_uring_register 389
+#endif
#else
#error "Arch not supported yet"
#endif