This website requires JavaScript.
Explore
Help
Sign In
OrgZephyr
/
zephyr
mirror of
https://github.com/zephyrproject-rtos/zephyr.git
Watch
1
Star
0
Fork
You've already forked zephyr
0
Code
Issues
Releases
Wiki
Activity
6d2d34bdad
zephyr
/
tests
/
posix
/
eventfd
/
testcase.yaml
6 lines
108 B
YAML
Raw
Normal View
History
Unescape
Escape
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>
2019-11-05 23:09:42 +08:00
tests
:
test: posix: fix identifier Follow convention for identifying tests. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-09 10:59:50 +08:00
portability.posix.eventfd
:
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>
2019-11-05 23:09:42 +08:00
arch_exclude
:
posix
min_ram
:
32
tags
:
posix pthread eventfd