KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Definitions for the poll() function. More...
#include <sys/cdefs.h>
#include <sys/types.h>
Go to the source code of this file.
Data Structures | |
struct | pollfd |
Structure representing a single file descriptor used by poll(). More... | |
Macros | |
#define | POLLRDNORM (1 << 0) |
Normal data may be read. | |
#define | POLLRDBAND (1 << 1) |
Priority data may be read. | |
#define | POLLPRI (1 << 2) |
High-priority data may be read. | |
#define | POLLOUT (1 << 3) |
Normal data may be written. | |
#define | POLLWRNORM POLLOUT |
Normal data may be written. | |
#define | POLLWRBAND (1 << 4) |
Priority data may be written. | |
#define | POLLERR (1 << 5) |
Error has occurred (revents only) | |
#define | POLLHUP (1 << 6) |
Peer disconnected (revents only) | |
#define | POLLNVAL (1 << 7) |
Invalid fd (revents only) | |
#define | POLLIN (POLLRDNORM | POLLRDBAND) |
Data other than high-priority data may be read. | |
Typedefs | |
typedef __uint32_t | nfds_t |
Type representing a number of file descriptors. | |
Functions | |
int | poll (struct pollfd fds[], nfds_t nfds, int timeout) |
Poll a group of file descriptors for activity. | |
Definitions for the poll() function.
This file contains the definitions needed for using the poll() function, as directed by the POSIX 2008 standard (aka The Open Group Base Specifications Issue 7). Currently the functionality defined herein only works for sockets, and that is likely how it will stay for some time.
The poll() function works quite similarly to the select() function that it is quite likely that you'd be more familiar with.