summaryrefslogtreecommitdiff
path: root/epoll_sub.c
diff options
context:
space:
mode:
authorNiels Provos <provos@gmail.com>2003-03-07 23:20:36 +0000
committerNiels Provos <provos@gmail.com>2003-03-07 23:20:36 +0000
commit3e41f17afacd87c3bf0a48adc395c3f7e4b7d8bf (patch)
tree46a9ce27b208183ccaf2994044a542771e58f664 /epoll_sub.c
parent01a932fe1fd385fdb961efdbac991dd4b481fc49 (diff)
downloadlibevent-3e41f17afacd87c3bf0a48adc395c3f7e4b7d8bf.tar.gz
support for Linux eventpoll mechanism
svn:r42
Diffstat (limited to 'epoll_sub.c')
-rw-r--r--epoll_sub.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/epoll_sub.c b/epoll_sub.c
new file mode 100644
index 00000000..598681e7
--- /dev/null
+++ b/epoll_sub.c
@@ -0,0 +1,26 @@
+#include <stdint.h>
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/syscall.h>
+#include <sys/epoll.h>
+#include <unistd.h>
+
+int
+epoll_create(int size)
+{
+ return (syscall(__NR_epoll_create, size));
+}
+
+int
+epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)
+{
+
+ return (syscall(__NR_epoll_ctl, epfd, op, fd, event));
+}
+
+int
+epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout)
+{
+ return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout));
+}