[vala] Linux: add epoll(7) and friends



commit 68ec877c7ca709cf21bedc047ffba2e4a957cc0c
Author: Michael 'Mickey' Lauer <mickey vanille-media de>
Date:   Tue Mar 1 16:20:27 2011 +0100

    Linux: add epoll(7) and friends
    
    Based on a patch by Stefano Debenedetti
    Closes bug #641790

 THANKS          |    1 +
 vapi/linux.vapi |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+), 0 deletions(-)
---
diff --git a/THANKS b/THANKS
index 088a52a..2a14358 100644
--- a/THANKS
+++ b/THANKS
@@ -122,6 +122,7 @@ Sebastian Pölsterl
 Sebastian Spaeth
 Shawn Ferris
 Simon Wenner
+Stefano Debenedetti
 Stéphan Kochen
 Tai Chi Minh Ralph Eastwood
 Thijs Vermeir
diff --git a/vapi/linux.vapi b/vapi/linux.vapi
index 93babcd..2611011 100644
--- a/vapi/linux.vapi
+++ b/vapi/linux.vapi
@@ -296,6 +296,55 @@ namespace Linux {
     public int eventfd_write (int fd, uint64 value);
 
     /*
+     * Epoll
+     */
+    [CCode (cprefix = "EPOLL_", cheader_filename = "sys/epoll.h")]
+    public enum EpollFdFlags {
+        CLOEXEC,
+    }
+
+    [CCode (cheader_filename = "sys/epoll.h", cname = "union epoll_data")]
+    public struct EpollData {
+        public void* ptr;
+        public int fd;
+        public uint32 u32;
+        public uint64 u64;
+    }
+
+    [CCode (cheader_filename = "sys/epoll.h", cname = "struct epoll_event")]
+    public struct EpollEvent {
+        public uint32 events;
+        public EpollData data;
+    }
+
+    [CCode (cheader_filename = "sys/epoll.h")]
+    public int epoll_create (int size = 0);
+    [CCode (cheader_filename = "sys/epoll.h")]
+    public int epoll_create1 (int flags = 0);
+    [CCode (cheader_filename = "sys/epoll.h")]
+    public int epoll_wait (int epfd, EpollEvent[] events, int timeout);
+    [CCode (cheader_filename = "sys/epoll.h")]
+    public int epoll_pwait (int epfd, EpollEvent[] events, Posix.sigset_t? sigmask, int timeout);
+    [CCode (cheader_filename = "sys/epoll.h")]
+    public int epoll_ctl (int epfd, int op, int fd, EpollEvent? ev);
+    [CCode (cheader_filename = "sys/epoll.h")]
+    public const int EPOLLIN;
+    [CCode (cheader_filename = "sys/epoll.h")]
+    public const int EPOLLOUT;
+    [CCode (cheader_filename = "sys/epoll.h")]
+    public const int EPOLLERR;
+    [CCode (cheader_filename = "sys/epoll.h")]
+    public const int EPOLLHUP;
+    [CCode (cheader_filename = "sys/epoll.h")]
+    public const int EPOLLET;
+    [CCode (cheader_filename = "sys/epoll.h")]
+    public const int EPOLL_CTL_ADD;
+    [CCode (cheader_filename = "sys/epoll.h")]
+    public const int EPOLL_CTL_MOD;
+    [CCode (cheader_filename = "sys/epoll.h")]
+    public const int EPOLL_CTL_DEL;
+
+    /*
      * Framebuffer
      */
     [CCode (cprefix = "", lower_case_cprefix = "")]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]