Tenok
A Linux-like Real-Time Operating System for Robotics and Internet of Things
Data Structures | Macros | Typedefs | Functions
poll.h File Reference
#include <stdint.h>
Include dependency graph for poll.h:

Go to the source code of this file.

Data Structures

struct  pollfd
 

Macros

#define POLLIN   1
 
#define POLLOUT   4
 
#define POLLNVAL   32
 

Typedefs

typedef uint32_t nfds_t
 

Functions

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...
 

Function Documentation

◆ 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
fdsA set of file descriptors with events to wait.
nfdsNumber of the provided fds.
timeoutThe 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
int0 on success and nonzero error number on error.