#include <signal.h>
#include <stdint.h>
Go to the source code of this file.
|
|
#define | POLLIN 1 |
| |
|
#define | POLLOUT 4 |
| |
|
#define | POLLNVAL 32 |
| |
|
| int | poll (struct pollfd *fds, nfds_t nfds, int timeout) |
| | Wait for one of a set of file descriptors to become ready to perform I/O. More...
|
| |
| int | ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts, const sigset_t *sigmask) |
| | Wait for one of the descriptors to become ready, with the timeout given as a timespec. Tenok blocks no signal, so the mask is accepted and has nothing to do. More...
|
| |
◆ poll()
| int poll |
( |
struct pollfd * |
fds, |
|
|
nfds_t |
nfds, |
|
|
int |
timeout |
|
) |
| |
Wait for one of a set of file descriptors to become ready to perform I/O.
- Parameters
-
| fds | A set of file descriptors with events to wait. |
| nfds | Number of the provided fds. |
| timeout | The number of milliseconds that poll() should block waiting for a file descriptor to become ready. Negative value means an infinite timeout and zero causes poll() to return immediately. |
- Return values
-
| int | The number of the ready descriptors on success and -1 on error, with the reason left in errno. |
◆ ppoll()
| int ppoll |
( |
struct pollfd * |
fds, |
|
|
nfds_t |
nfds, |
|
|
const struct timespec * |
timeout_ts, |
|
|
const sigset_t * |
sigmask |
|
) |
| |
Wait for one of the descriptors to become ready, with the timeout given as a timespec. Tenok blocks no signal, so the mask is accepted and has nothing to do.
- Parameters
-
| fds | The descriptors to wait on. |
| nfds | How many of them there are. |
| timeout_ts | How long to wait, or a null pointer to wait forever. |
| sigmask | The signals to block while waiting. Not used. |
- Return values
-
| int | The number of the ready descriptors on success and -1 on error, with the reason left in errno. |