1rsm_memseg_get_pollfdR(e3mRoStMe)Shared Memory Library Funrcstmi_omnesmseg_get_pollfd(3RSM)
2
3
4

NAME

6       rsm_memseg_get_pollfd,  rsm_memseg_release_pollfd  -  get  or release a
7       poll descriptor
8

SYNOPSIS

10       cc [ flag... ] file... -lrsm [ library... ]
11       #include <rsmapi.h>
12
13       int rsm_memseg_get_pollfd(void *memseg, struct pollfd *fd);
14
15
16       int rsm_memseg_release_pollfd(void *memseg);
17
18

DESCRIPTION

20       The rsm_memseg_get_pollfd() and  rsm_memseg_release_pollfd()  functions
21       provide  an  alternative  to  rsm_intr_signal_wait(3RSM).  The  waiting
22       process can multiplex event waiting using the  poll(2)  function  after
23       first  obtaining  a  poll descriptor using rsm_memseg_get_pollfd(). The
24       descriptor   can    subsequently    be    released    using    rsm_mem‐
25       seg_release_pollfd().
26
27
28       As  a  result  of  a call rsm_memseg_get_pollfd(), the specified pollfd
29       structure is initialized with a descriptor for  the  specified  segment
30       (memseg)  and the event generated by rsm_intr_signal_post(3RSM). Either
31       an export segment handle or an import segment handle can be  type  cast
32       to  a  void  pointer. The pollfd argument can subsequently be used with
33       the rsm_intr_signal_wait_pollfd(3RSM) function to wait for  the  event;
34       it  cannot be used with poll(). If memseg references an export segment,
35       the segment must be  currently  published.   If  memseg  references  an
36       import segment, the segment must be connected.
37
38
39       The  rsm_memseg_reslease_pollfd()  function  decrements  the  reference
40       count of the pollfd structure associated with the specified segment.  A
41       segment  unpublish,  destroy or unmap operation will fail if the refer‐
42       ence count is non-zero.
43

RETURN VALUES

45       Upon successful completion, these functions return  0.   Otherwise,  an
46       error value is returned to indicate the error.
47

ERRORS

49       The  rsm_memseg_get_pollfd()  and  rsm_memseg_release_pollfd() function
50       can return the following error:
51
52       RSMERR_BAD_SEG_HNDL     Invalid segment handle.
53
54

ATTRIBUTES

56       See attributes(5) for descriptions of the following attributes:
57
58
59
60
61       ┌─────────────────────────────┬─────────────────────────────┐
62       │ATTRIBUTE TYPE               │ATTRIBUTE VALUE              │
63       ├─────────────────────────────┼─────────────────────────────┤
64       │Interface Stability          │Evolving                     │
65       ├─────────────────────────────┼─────────────────────────────┤
66       │MT-Level                     │MT-Safe                      │
67       └─────────────────────────────┴─────────────────────────────┘
68

SEE ALSO

70       poll(2), rsm_intr_signal_post(3RSM), rsm_intr_signal_wait_pollfd(3RSM),
71       attributes(5)
72
73
74
75SunOS 5.11                        1 Dec 2002       rsm_memseg_get_pollfd(3RSM)
Impressum