Remote Shared Memory Library Functions
rsm_intr_signal_wait_pollfd(3RSM)
NAME
rsm_intr_signal_wait_pollfd - wait for events on a list of
file descriptorsSYNOPSIS
cc [ flag... ] file... -lrsm [ library ... ]
#include
int rsm_intr_signal_wait_pollfd(struct pollfd fds[],
nfds_t nfds, int timeout, int *numfdsp);
DESCRIPTION
The rsm_intr_signal_wait_pollfd() function is similar to
rsm_intr_signal_wait(3RSM), except that it allows an appli-
cation to multiplex I/O over various types of file descrip-
tors. Applications can use this function to wait for inter-
rupt signals on RSMAPI segments as well as poll for I/O
events on other non-RSMAPI file descriptors.
The fds argument is an array of pollfd structures thatcorrespond to both RSMAPI segments and other file descrip-
tors. The rsm_memseg_get_pollfd(3RSM) is used to obtain a
pollfd structure corresponding to an RSMAPI segment. The number of file descriptors that have events is returnedin numfdsp. This parameter can be set to NULL if the appli-
cation is not interested in the number of file descriptors that have events. See poll(2) for descriptions of the pollfd structure as well as the nfds and timeout parameters. It is the application's responsibility to establish the validity of a pollfd structure corresponding to an RSMAPIsegment by ensuring that rsm_memseg_release_pollfd(3RSM) has
not been called on the segment or that the segment has not been destroyed. For file descriptors other than RSMAPI segments, thebehavior of rsm_intr_signal_wait_pollfd() is similar to
poll().RETURN VALUES
Upon successful completion, rsm_intr_signal_wait_pollfd()
returns 0 and the revents member of the pollfd struct corresponding to an RSMAPI segment is set to POLLRDNORM, indicating that an interrupt signal for that segment was received. Otherwise, an error value is returned.SunOS 5.11 Last change: 1 Dec 2002 1
Remote Shared Memory Library Functionsrsm_intr_signal_wait_pollfd(3RSM)
For file descriptors other than RSMAPI segments, the revents member of the pollfd struct is identical to that returned by poll(2).ERRORS
The rsm_intr_signal_wait_pollfd() function can return the
following errors:RSMERR_TIMEOUT
Timeout has occured.RSMERR_BAD_ARGS_ERRORS
Invalid arguments passed.RSMERR_BAD_ADDR
An argument points to an illegal address.RSMERR_INTERRUPTED
The call was interrupted.RSMERR_INSUFFICIENT_MEM
Insufficient memory.RSMERR_INSUFFICIENT_RESOURCES
Insufficient resources.ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:SunOS 5.11 Last change: 1 Dec 2002 2
Remote Shared Memory Library Functionsrsm_intr_signal_wait_pollfd(3RSM)
______________________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Interface Stability | Committed ||_____________________________|_____________________________|
| MT-Level | MT-Safe |
|_____________________________|_____________________________|
SEE ALSO
poll(2), rsm_intr_signal_wait(3RSM),
rsm_memseg_get_pollfd(3RSM),
rsm_memseg_release_pollfd(3RSM), attributes(5)
SunOS 5.11 Last change: 1 Dec 2002 3
Remote Shared Memory Library Functionsrsm_intr_signal_wait_pollfd(3RSM)
SunOS 5.11 Last change: 1 Dec 2002 4