Remote Shared Memory Library Functions
rsm_memseg_get_pollfd(3RSM)
NAME
rsm_memseg_get_pollfd, rsm_memseg_release_pollfd - get or
release a poll descriptorSYNOPSIS
cc [ flag... ] file... -lrsm [ library... ]
#include
int rsm_memseg_get_pollfd(void *memseg, struct pollfd *fd);
int rsm_memseg_release_pollfd(void *memseg);
DESCRIPTION
The rsm_memseg_get_pollfd() and rsm_memseg_release_pollfd()
functions provide an alternative torsm_intr_signal_wait(3RSM). The waiting process can multi-
plex event waiting using the poll(2) function after firstobtaining a poll descriptor using rsm_memseg_get_pollfd().
The descriptor can subsequently be released usingrsm_memseg_release_pollfd().
As a result of a call rsm_memseg_get_pollfd(), the specified
pollfd structure is initialized with a descriptor for the specified segment (memseg) and the event generated byrsm_intr_signal_post(3RSM). Either an export segment handle
or an import segment handle can be type cast to a void pointer. The pollfd argument can subsequently be used withthe rsm_intr_signal_wait_pollfd(3RSM) function to wait for
the event; it cannot be used with poll(). If memseg refer-
ences an export segment, the segment must be currently pub-
lished. If memseg references an import segment, the segment must be connected.The rsm_memseg_reslease_pollfd() function decrements the
reference count of the pollfd structure associated with the specified segment. A segment unpublish, destroy or unmapoperation will fail if the reference count is non-zero.
RETURN VALUES
Upon successful completion, these functions return 0. Oth-
erwise, an error value is returned to indicate the error.ERRORS
The rsm_memseg_get_pollfd() and rsm_memseg_release_pollfd()
function can return the following error:SunOS 5.11 Last change: 1 Dec 2002 1
Remote Shared Memory Library Functionsrsm_memseg_get_pollfd(3RSM)
RSMERR_BAD_SEG_HNDL Invalid segment handle.
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Interface Stability | Committed ||_____________________________|_____________________________|
| MT-Level | MT-Safe |
|_____________________________|_____________________________|
SEE ALSO
poll(2), rsm_intr_signal_post(3RSM),
rsm_intr_signal_wait_pollfd(3RSM), attributes(5)
SunOS 5.11 Last change: 1 Dec 2002 2
Remote Shared Memory Library Functionsrsm_memseg_get_pollfd(3RSM)
SunOS 5.11 Last change: 1 Dec 2002 3