Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
core.sys.linux.epoll
D header file to interface with the Linux epoll API (http://man7.org/linux/man-pages/man7/epoll.7.html).
Available since Linux 2.6
EPOLL_CTL_ADD
- Add a file descriptor to the interface.
EPOLL_CTL_DEL
- Remove a file descriptor from the interface.
EPOLL_CTL_MOD
- Change file descriptor epoll_event structure.
- nothrow @nogc int
epoll_create
(intsize
); - Creates an epoll instance.Parameters:
int size
a hint specifying the number of file descriptors to be associated with the new instance. T Returns:an fd for the new instance. The fd returned by epoll_create() should be closed with close().See Also:epoll_create1 (int flags) - nothrow @nogc int
epoll_create1
(intflags
); - Creates an epoll instance.Parameters:
int flags
a specified flag. If flags is 0, then, other than the fact that the obsolete size argument is dropped, epoll_create1() is the same as epoll_create(). Returns:an fd for the new instance. The fd returned by epoll_create() should be closed with close().See Also:epoll_create (int size) - nothrow @nogc int
epoll_ctl
(intepfd
, intop
, intfd
, epoll_event*event
); - Manipulate an epoll instanceParameters:
int epfd
an epoll file descriptor instance int op
one of the EPOLL_CTL_* constants int fd
target file descriptor of the operation epoll_event* event
describes which events the caller is interested in and any associated user dat Returns:0 in case of success, -1 in case of error ( the "errno" variable will contain the specific error code ) - nothrow @nogc int
epoll_wait
(intepfd
, epoll_event*events
, intmaxevents
, inttimeout
); - Wait for events on an epoll instance.Parameters:
int epfd
an epoll file descriptor instance epoll_event* events
a buffer that will contain triggered events int maxevents
the maximum number of events to be returned ( usually size of "events" ) int timeout
specifies the maximum wait time in milliseconds (-1 == infinite) Returns:the number of triggered events returned in "events" buffer. Or -1 in case of error with the "errno" variable set to the specific error code. - nothrow @nogc int
epoll_pwait
(intepfd
, epoll_event*events
, intmaxevents
, inttimeout
, const sigset_t*ss
); - Wait for events on an epoll instanceParameters:
int epfd
an epoll file descriptor instance epoll_event* events
a buffer that will contain triggered events int maxevents
the maximum number of events to be returned ( usually size of "events" ) int timeout
specifies the maximum wait time in milliseconds (-1 == infinite) sigset_t* ss
a signal set. May be specified as null, in which case epoll_pwait() is equivalent to epoll_wait(). Returns:the number of triggered events returned in "events" buffer. Or -1 in case of error with the "errno" variable set to the specific error code.
Copyright © 1999-2025 by the D Language Foundation | Page generated by
Ddoc on Mon Apr 28 06:59:37 2025