Query: rsm_memseg_get_pollfd
OS: opensolaris
Section: 3rsm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
rsm_memseg_get_pollfd(3RSM) Remote Shared Memory Library Functions rsm_memseg_get_pollfd(3RSM)NAMErsm_memseg_get_pollfd, rsm_memseg_release_pollfd - get or release a poll descriptorSYNOPSIScc [ flag... ] file... -lrsm [ library... ] #include <rsmapi.h> int rsm_memseg_get_pollfd(void *memseg, struct pollfd *fd); int rsm_memseg_release_pollfd(void *memseg);DESCRIPTIONThe rsm_memseg_get_pollfd() and rsm_memseg_release_pollfd() functions provide an alternative to rsm_intr_signal_wait(3RSM). The waiting process can multiplex event waiting using the poll(2) function after first obtaining a poll descriptor using rsm_memseg_get_pollfd(). The descriptor can subsequently be released using rsm_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 by rsm_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 with the rsm_intr_signal_wait_pollfd(3RSM) function to wait for the event; it cannot be used with poll(). If memseg references an export segment, the segment must be currently published. If memseg refer- ences 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 unmap operation will fail if the reference count is non-zero.RETURN VALUESUpon successful completion, these functions return 0. Otherwise, an error value is returned to indicate the error.ERRORSThe rsm_memseg_get_pollfd() and rsm_memseg_release_pollfd() function can return the following error: RSMERR_BAD_SEG_HNDL Invalid segment handle.ATTRIBUTESSee attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ |ATTRIBUTE TYPE |ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+SEE ALSOpoll(2), rsm_intr_signal_post(3RSM), rsm_intr_signal_wait_pollfd(3RSM), attributes(5) SunOS 5.11 1 Dec 2002 rsm_memseg_get_pollfd(3RSM)
Similar Topics in the Unix Linux Community |
---|
How to Sort?? Pls help!! |
How to use poll() for I/O multiplex |