Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rsm_intr_signal_wait_pollfd(3rsm) [sunos man page]

rsm_intr_signal_wait_pollfd(3RSM)		      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 descriptors SYNOPSIS
cc [ flag... ] file... -lrsm [ library ... ] #include <rsmapi.h> 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 application to multiplex I/O over various types of file descriptors. Applications can use this function to wait for interrupt 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 that correspond to both RSMAPI segments and other file descriptors. The rsm_mem- seg_get_pollfd(3RSM) is used to obtain a pollfd structure corresponding to an RSMAPI segment. The number of file descriptors that have events is returned in numfdsp. This parameter can be set to NULL if the application is not inter- ested 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 RSMAPI segment 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, the behavior 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. 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 attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |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.10 1 Dec 2002 rsm_intr_signal_wait_pollfd(3RSM)

Check Out this Related Man Page

rsm_intr_signal_post(3RSM)			      Remote Shared Memory Library Functions				rsm_intr_signal_post(3RSM)

NAME
rsm_intr_signal_post, rsm_intr_signal_wait - signal or wait for an event SYNOPSIS
cc [ flag... ] file... -lrsm [ library... ] #include <rsmapi.h> int rsm_intr_signal_post(void *memseg, uint_t flags); int rsm_intr_signal_wait(void *memseg, int timeout); DESCRIPTION
The rsm_intr_signal_post() and rsm_intr_signal_wait() functions are event functions that allow synchronization between importer processes and exporter processes. A process may block to wait for an event occurance by calling rsm_intr_signal_wait(). A process can signal a wait- ing process when an event occurs by calling rsm_intr_signal_post(). The rsm_intr_signal_post() function signals an event occurance. Either an import segment handle (rsm_memseg_import_handle_t) or an export segment handle (rsm_memseg_export_handle_t) may be type cast to a void pointer for the memseg argument. If memseg refers to an import han- dle, the exporting process is signalled. If memseg refers to an export handle, all importers of that segment are signalled. The flags argu- ment may be set to RSM_SIGPOST_NO_ACCUMULATE; this will cause this event to be discarded if an event is already pending for the target seg- ment. The rsm_intr_signal_wait() function allows a process to block and wait for an event occurance. Either an import segment handle (rsm_mem- seg_import_handle_t) or an export segment handle (rsm_memseg_export_handle_t) may be type cast to a void pointer for the memseg argument. The process blocks for up to timeout milliseconds for an event to occur; if the timeout value is -1, the process blocks until an event occurs or until interrupted. RETURN VALUES
Upon successful completion, these functions return 0. Otherwise, an error value is returned to indicate the error. ERRORS
The rsm_intr_signal_post() and rsm_intr_signal_wait() functions can return the following error: RSMERR_BAD_SEG_HNDL Invalid segment handle. The rsm_intr_signal_post() function can return the following error: RSMERR_CONN_ABORTED Connection aborted. RSMERR_REMOTE_NODE_UNREACHABL Remote node not reachable. The rsm_intr_signal_wait() function can return the following errors: RSMERR_INTERRUPTED Wait interrupted. RSMERR_TIMEOUT Timer expired. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
rsm_memseg_get_pollfd(3RSM), attributes(5) SunOS 5.10 7 Nov 2002 rsm_intr_signal_post(3RSM)
Man Page