Syntax | #include <sys/epoll.h> int epoll_ctl (int epfd, int op, int fd, struct epoll_event *event) | |
Description | This system call performs control operations on the Parameter-description: int op Valid values for the
Register the target file descriptor
Change the event
Remove (deregister) the target file descriptor fd from the struct epoll_event *event The event argument describes the events to be monitored for file descriptor fd as well as application specific data, which are to be returned if one of the events occurs. The typedef union epoll_data { void *ptr; int fd; uint32_t u32; uint64_t u64; } epoll_data_t; struct epoll_event { uint32_t events; /* Epoll events */ epoll_data_t data; /* User data variable */ }; The The
Data other than high-priority data may be read without blocking. For STREAMS, this flag is set in EPOLLPRI Data other than high-priority data may be read without blocking. For STREAMS, this flag is set in
Normal data (priority band equals 0) may be written without blocking.
An error has occurred on the device or stream. The function
A hangup has occured in the stream. The device has been disconnected.
Normal data (priority band equals 0) may be read without blocking. For STREAMS, this flag is set in
as
Data from a non-zero priority band may be read without blocking. For STREAMS, this flag is set in
Priority data (priority band > 0) may be written.
as
This functionality is not supported in POSIX. | |
Returnwert | 0 | if successful. |
| -1 | if an error occurs; |
Fehler |
| |
| epfd or fd is not a valid file descriptor. | |
| op was EPOLL_CTL_MOD or EPOLL_CTL_DEL, and fd is not registered with the | |
| op was EPOLL_CTL_ADD, and the supplied file descriptor | |
| epfd is not an | |
See also |
|