summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libc/Android.mk8
-rw-r--r--libc/SYSCALLS.TXT2
-rw-r--r--libc/arch-arm/syscalls.mk1
-rw-r--r--libc/arch-arm/syscalls/eventfd.S19
-rw-r--r--libc/include/sys/eventfd.h14
-rw-r--r--libc/include/sys/linux-syscalls.h3
-rw-r--r--libc/include/sys/linux-unistd.h1
7 files changed, 41 insertions, 7 deletions
diff --git a/libc/Android.mk b/libc/Android.mk
index 568cc94..a034c50 100644
--- a/libc/Android.mk
+++ b/libc/Android.mk
@@ -447,13 +447,7 @@ ifeq ($(TARGET_ARCH),arm)
libc_common_cflags += -DHAVE_ARM_TLS_REGISTER
endif
else # !arm
- ifeq ($(TARGET_ARCH),x86)
- libc_crt_target_cflags := -m32
-
- # Enable recent IA friendly memory routines (such as for Atom)
- # These will not work on the earlier x86 machines
- libc_common_cflags += -mtune=i686 -DUSE_SSSE3 -DUSE_SSE2
- endif # x86
+ libc_crt_target_cflags :=
endif # !arm
# Define some common includes
diff --git a/libc/SYSCALLS.TXT b/libc/SYSCALLS.TXT
index 11407b9..b5a3bbe 100644
--- a/libc/SYSCALLS.TXT
+++ b/libc/SYSCALLS.TXT
@@ -262,3 +262,5 @@ int poll(struct pollfd *, unsigned int, long) 168
# ARM-specific ARM_NR_BASE == 0x0f0000 == 983040
int __set_tls:ARM_set_tls(void*) 983045,-1
int cacheflush:ARM_cacheflush(long start, long end, long flags) 983042,-1
+
+int eventfd(int count, int flags) 351,323
diff --git a/libc/arch-arm/syscalls.mk b/libc/arch-arm/syscalls.mk
index 9cdd28a..9bfe70a 100644
--- a/libc/arch-arm/syscalls.mk
+++ b/libc/arch-arm/syscalls.mk
@@ -171,3 +171,4 @@ syscall_src += arch-arm/syscalls/inotify_rm_watch.S
syscall_src += arch-arm/syscalls/poll.S
syscall_src += arch-arm/syscalls/__set_tls.S
syscall_src += arch-arm/syscalls/cacheflush.S
+syscall_src += arch-arm/syscalls/eventfd.S
diff --git a/libc/arch-arm/syscalls/eventfd.S b/libc/arch-arm/syscalls/eventfd.S
new file mode 100644
index 0000000..fb0912f
--- /dev/null
+++ b/libc/arch-arm/syscalls/eventfd.S
@@ -0,0 +1,19 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type eventfd, #function
+ .globl eventfd
+ .align 4
+ .fnstart
+
+eventfd:
+ .save {r4, r7}
+ stmfd sp!, {r4, r7}
+ ldr r7, =__NR_eventfd
+ swi #0
+ ldmfd sp!, {r4, r7}
+ movs r0, r0
+ bxpl lr
+ b __set_syscall_errno
+ .fnend
diff --git a/libc/include/sys/eventfd.h b/libc/include/sys/eventfd.h
new file mode 100644
index 0000000..0e142fd
--- /dev/null
+++ b/libc/include/sys/eventfd.h
@@ -0,0 +1,14 @@
+#ifndef _SYS_EVENTFD_H_
+#define _SYS_EVENTFD_H_
+
+#include <sys/cdefs.h>
+#include <asm/unistd.h>
+#include <asm/termbits.h>
+
+__BEGIN_DECLS
+
+extern int eventfd(int count, int flags);
+
+__END_DECLS
+
+#endif /* _SYS_EVENTFD_H_ */
diff --git a/libc/include/sys/linux-syscalls.h b/libc/include/sys/linux-syscalls.h
index 6e373e0..9fefd86 100644
--- a/libc/include/sys/linux-syscalls.h
+++ b/libc/include/sys/linux-syscalls.h
@@ -181,6 +181,7 @@
#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 318)
#define __NR_ARM_set_tls (__NR_SYSCALL_BASE + 983045)
#define __NR_ARM_cacheflush (__NR_SYSCALL_BASE + 983042)
+#define __NR_eventfd (__NR_SYSCALL_BASE + 351)
#endif
#ifdef __i386__
@@ -222,6 +223,7 @@
#define __NR_inotify_init (__NR_SYSCALL_BASE + 291)
#define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 292)
#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 293)
+#define __NR_eventfd (__NR_SYSCALL_BASE + 323)
#endif
#if defined(__SH3__) || defined(__SH4__)
@@ -279,6 +281,7 @@
#define __NR_inotify_init (__NR_SYSCALL_BASE + 290)
#define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 291)
#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 292)
+#define __NR_eventfd (__NR_SYSCALL_BASE + 323)
#endif
#endif
diff --git a/libc/include/sys/linux-unistd.h b/libc/include/sys/linux-unistd.h
index b0e7822..de5c2bb 100644
--- a/libc/include/sys/linux-unistd.h
+++ b/libc/include/sys/linux-unistd.h
@@ -202,6 +202,7 @@ int inotify_rm_watch (int, unsigned int);
int poll (struct pollfd *, unsigned int, long);
int __set_tls (void*);
int cacheflush (long start, long end, long flags);
+int eventfd (int count, int flags);
#ifdef __cplusplus
}
#endif