Add eventfd system call support
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 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