2 .\" Copyright (c) 2002 by Sun Microsystems, Inc. All rights reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH RSM_MEMSEG_GET_POLLFD 3RSM "Dec 1, 2002"
8 rsm_memseg_get_pollfd, rsm_memseg_release_pollfd \- get or release a poll
13 cc [ \fIflag\fR... ] \fIfile\fR... -lrsm [ \fIlibrary\fR... ]
16 \fBint\fR \fBrsm_memseg_get_pollfd\fR(\fBvoid *\fR\fImemseg\fR, \fBstruct pollfd *\fR\fIfd\fR);
21 \fBint\fR \fBrsm_memseg_release_pollfd\fR(\fBvoid *\fR\fImemseg\fR);
27 The \fBrsm_memseg_get_pollfd()\fR and \fBrsm_memseg_release_pollfd()\fR
28 functions provide an alternative to \fBrsm_intr_signal_wait\fR(3RSM). The
29 waiting process can multiplex event waiting using the \fBpoll\fR(2) function
30 after first obtaining a poll descriptor using \fBrsm_memseg_get_pollfd()\fR.
31 The descriptor can subsequently be released using
32 \fBrsm_memseg_release_pollfd()\fR.
35 As a result of a call \fBrsm_memseg_get_pollfd()\fR, the specified \fBpollfd\fR
36 structure is initialized with a descriptor for the specified segment
37 (\fImemseg\fR) and the event generated by \fBrsm_intr_signal_post\fR(3RSM).
38 Either an export segment handle or an import segment handle can be type cast to
39 a void pointer. The \fIpollfd\fR argument can subsequently be used with the
40 \fBrsm_intr_signal_wait_pollfd\fR(3RSM) function to wait for the event; it
41 cannot be used with \fBpoll()\fR. If \fImemseg\fR references an export segment,
42 the segment must be currently published. If \fImemseg\fR references an import
43 segment, the segment must be connected.
46 The \fBrsm_memseg_reslease_pollfd()\fR function decrements the reference count
47 of the \fBpollfd\fR structure associated with the specified segment. A segment
48 unpublish, destroy or unmap operation will fail if the reference count is
53 Upon successful completion, these functions return 0. Otherwise, an error
54 value is returned to indicate the error.
58 The \fBrsm_memseg_get_pollfd()\fR and \fBrsm_memseg_release_pollfd()\fR
59 function can return the following error:
63 \fB\fBRSMERR_BAD_SEG_HNDL\fR \fR
66 Invalid segment handle.
72 See \fBattributes\fR(5) for descriptions of the following attributes:
80 ATTRIBUTE TYPE ATTRIBUTE VALUE
82 Interface Stability Evolving
90 \fBpoll\fR(2), \fBrsm_intr_signal_post\fR(3RSM),
91 \fBrsm_intr_signal_wait_pollfd\fR(3RSM), \fBattributes\fR(5)