Commit 68ec877c authored by Dr. Mickey Lauer's avatar Dr. Mickey Lauer 💬

Linux: add epoll(7) and friends

Based on a patch by Stefano Debenedetti
Closes bug #641790
parent cd9d5fa3
......@@ -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
......
......@@ -295,6 +295,55 @@ namespace Linux {
public int eventfd_read (int fd, out uint64 value);
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
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment