summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/eventfd.c
diff options
context:
space:
mode:
authorJean-Christian de Rivaz <jc@eclis.ch>2011-10-24 19:07:43 +0200
committerCarmelo Amoroso <carmelo.amoroso@st.com>2011-10-31 06:54:06 +0100
commit9ed163dc0eaebe8734c35b356c406e9eb1c68d76 (patch)
tree3bd97aaba4a2e8415c1bcf3049ef7f43ef423259 /libc/sysdeps/linux/common/eventfd.c
parent015179a2c816abe1e6a8ef7e5517362f20dd49da (diff)
Add eventfd support.
Hello, I whould like to share this simple patch that add the eventfd call to uClibc. Please review so it can be accepted to be merged. Jean-Christian Signed-off-by: Jean-Christian de Rivaz <jc@eclis.ch> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/sysdeps/linux/common/eventfd.c')
-rw-r--r--libc/sysdeps/linux/common/eventfd.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/eventfd.c b/libc/sysdeps/linux/common/eventfd.c
new file mode 100644
index 000000000..cc3f3f0f7
--- /dev/null
+++ b/libc/sysdeps/linux/common/eventfd.c
@@ -0,0 +1,18 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * eventfd() for uClibc
+ *
+ * Copyright (C) 2011 Jean-Christian de Rivaz <jc@eclis.ch>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#include <sys/syscall.h>
+#include <sys/eventfd.h>
+
+/*
+ * eventfd()
+ */
+#ifdef __NR_eventfd
+_syscall2(int, eventfd, int, count, int, flags)
+#endif