Defines the structures and flags used by the poll subroutine.
The /usr/include/sys/poll.h file defines several structures used by the poll subroutine. An array of pollfd or pollmsg structures or a pollist structure specify the file descriptors or pointers and message queues for which the poll subroutine checks the I/O status. This file also defines the returned events flags, error returned events flags, device-type flags and input flags used in polling operations.
During a polling operation on both file descriptors and message queues, the ListPointer parameter points to a pollist structure, which can specify either file descriptors or pointers and message queues. The program must define the pollist structure in the following form:
struct pollist { struct pollfd fdlist[f]; struct pollmsg msglist[m]; };
The pollfd structure
and the pollmsg structure in the pollist structure
perform the following functions:
A POLLIST macro is also defined in the poll.h file to define the pollist structure. The format of the macro is:
POLLIST(f, m) Declarator . . . ;
The Declarator parameter is the name of the variable that is declared as having this type.
The pollfd and
pollmsg structures defined in the poll.h file
contain the following fields:
The fp_poll kernel service, fp_select kernel service, selnotify kernel service.
The poll subroutine, select subroutine.
The Header Files Overview defines header files, describes how they are used, and lists several of the header files for which information is provided in this documentation.
The Input and Output Handling Programmer's Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs describes the files, commands, and subroutines used for low-level, stream, terminal, and asynchronous I/O interfaces.