zephyr/include/posix
Tobias Svehagen ca872a44c1 lib: posix: Add support for eventfd
This implements a file descriptor used for event notification that
behaves like the eventfd in Linux.

The eventfd supports nonblocking operation by setting the EFD_NONBLOCK
flag and semaphore operation by settings the EFD_SEMAPHORE flag.

The major use case for this is when using poll() and the sockets that
you poll are dynamic. When a new socket needs to be added to the poll,
there must be some way to wake the thread and update the pollfds before
calling poll again. One way to solve it is to have a timeout set in the
poll call and only update the pollfds during a timeout but that is not
a very nice solution. By instead including an eventfd in the pollfds,
it is possible to wake the polling thread by simply writing to the
eventfd.

Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
2020-04-28 09:57:41 +03:00
..
arpa include/posix: rearrange for standard use of extern "C" 2019-08-13 18:00:31 +02:00
net posix: Add headers related to BSD Sockets API 2019-08-07 15:02:11 +03:00
netinet posix: Add headers related to BSD Sockets API 2019-08-07 15:02:11 +03:00
sys lib: posix: Add support for eventfd 2020-04-28 09:57:41 +03:00
dirent.h include/posix: rearrange for standard use of extern "C" 2019-08-13 18:00:31 +02:00
mqueue.h posix: mqueue.h: Move O_CREAT and friends to fcntl.h 2019-07-25 13:50:58 -04:00
netdb.h include/posix: rearrange for standard use of extern "C" 2019-08-13 18:00:31 +02:00
poll.h include: posix: Add poll.h header 2019-08-27 15:02:42 +02:00
posix_sched.h posix: rename priority in sched_param struct 2019-02-19 11:24:45 -05:00
posix_types.h include: posix: time: Make possible to include with CONFIG_ARCH_POSIX 2020-03-10 15:04:12 +02:00
pthread.h pthread: add setname/getname glibc extensions 2020-03-10 15:15:34 +02:00
pthread_key.h include/posix: rearrange for standard use of extern "C" 2019-08-13 18:00:31 +02:00
semaphore.h include/posix: rearrange for standard use of extern "C" 2019-08-13 18:00:31 +02:00
signal.h include/posix: rearrange for standard use of extern "C" 2019-08-13 18:00:31 +02:00
time.h lib: posix: clock: Turn clock_gettime into system call 2020-04-17 08:08:37 -04:00
unistd.h posix: fix unistd.h extern C brace mismatch 2020-02-11 17:50:21 +02:00