Sign in Join
FPDoc Onlineexperiment

epoll_wait function

In unit Linux

Wait for an event on an epoll file descriptor.

Declaration

pascal
function epoll_wait(epfd: cint; events: PEpoll_Event; maxevents: cint; 
 timeout: cint): cint

Description

epoll_wait waits for timeout milliseconds for an event to occur on epoll file descriptor epfd. If timeout is -1, it waits indefinitely, if timeour is zero, it does not wait, but returns immediately, even if no events were detected.

On return, data for at most maxevents will be returned in the memory pointed to by events. The function returns the number of file descriptors for which events were reported. This can be zero if the timeout was reached.

Errors

On error -1 is returned, and errno is set accordingly.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.