diff options
author | Iku Iwasa <iku.iwasa@gmail.com> | 2012-09-16 16:36:52 +0900 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-10-04 16:06:41 +0100 |
commit | e2fec9796428e5a8dac71635cb1072489ca3b193 (patch) | |
tree | fe5145d3c1975966e6ba34ac4df8bf3ae7132c92 /libraries/base/include/HsBase.h | |
parent | 4aa8bc19c7293f9740e2c826e53fb6ce1a36c834 (diff) | |
download | haskell-e2fec9796428e5a8dac71635cb1072489ca3b193.tar.gz |
FFI wrapper for kevent()
Diffstat (limited to 'libraries/base/include/HsBase.h')
-rw-r--r-- | libraries/base/include/HsBase.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libraries/base/include/HsBase.h b/libraries/base/include/HsBase.h index 74ab816d84..99efde5713 100644 --- a/libraries/base/include/HsBase.h +++ b/libraries/base/include/HsBase.h @@ -155,6 +155,10 @@ extern HsWord64 getMonotonicUSec(void); #include <sys/select.h> #endif +#if HAVE_SYS_EVENT_H +#include <sys/event.h> +#endif + /* in inputReady.c */ extern int fdReady(int fd, int write, int msecs, int isSock); @@ -541,6 +545,15 @@ INLINE int __hscore_open(char *file, int how, mode_t mode) { } #endif +#ifdef HAVE_KEVENT +INLINE int __hscore_kevent(int kq, const struct kevent *changelist, + size_t nchanges, struct kevent *eventlist, + size_t nevents, const struct timespec *timeout) { + return kevent(kq, changelist, nchanges, eventlist, nevents, timeout); +} +#endif + + #if darwin_HOST_OS // You should not access _environ directly on Darwin in a bundle/shared library. // See #2458 and http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man7/environ.7.html |