include/poll.h File Reference

Go to the source code of this file.

Data Structures

struct  pollfd
 Poll request for an FD. More...

Defines

#define _ABLE_CLIB_POLL_H   1
#define POLLIN   0x001
 There is data to be read.
#define POLLPRI   0x002
 There is urgent data to be read.
#define POLLOUT   0x004
 Space is available in the output buffer.
#define POLLERR   0x008
 FD encountered an error condition.
#define POLLHUP   0x010
 FD was hung up.
#define POLLNVAL   0x020
 Invalid polling request.

Typedefs

typedef unsigned long int nfds_t

Functions

int poll (struct pollfd *fds, nfds_t nfds, int timeout)
 Poll a set of FDs for given events.


Define Documentation

#define _ABLE_CLIB_POLL_H   1

#define POLLERR   0x008

FD encountered an error condition.

#define POLLHUP   0x010

FD was hung up.

#define POLLIN   0x001

There is data to be read.

#define POLLNVAL   0x020

Invalid polling request.

#define POLLOUT   0x004

Space is available in the output buffer.

#define POLLPRI   0x002

There is urgent data to be read.


Typedef Documentation

typedef unsigned long int nfds_t


Function Documentation

int poll ( struct pollfd fds,
nfds_t  nfds,
int  timeout 
)

Poll a set of FDs for given events.

Given an array of pollfd structures, check them for the requested events, returning the number of FDs which have had events trigger. If no events occur within the timeout, return anyway.

Parameters:
fds The pollfd array to poll.
nfds The number of entries in the array.
timeout The time to wait in milliseconds, -ve to wait forever.
Returns:
0 on timeout, -1 on error, otherwise number of FDs which had events.


Generated on Tue Jan 20 14:28:56 2009 for ABLE LIBC by  doxygen 1.5.6