diff options
Diffstat (limited to 'src/fd_util.h')
-rw-r--r-- | src/fd_util.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/fd_util.h b/src/fd_util.h index c8a17c7ef..e65c6a69b 100644 --- a/src/fd_util.h +++ b/src/fd_util.h @@ -144,6 +144,17 @@ inotify_init_cloexec(void); #endif +#ifdef HAVE_EVENTFD + +/** + * Wrapper for eventfd() which sets the flags CLOEXEC and NONBLOCK + * flag (atomically if supported by the OS). + */ +int +eventfd_cloexec_nonblock(unsigned initval, int flags); + +#endif + /** * Portable wrapper for close(); use closesocket() on WIN32/WinSock. */ |