Merge commit 'c5bab7026b8e0ac44b25ee08507ea360f177d844' into merges
[unleashed.git] / share / man / man3rsm / rsm_intr_signal_post.3rsm
blobd877b447da379e35b7c70b2becb331497241996b
1 '\" te
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_INTR_SIGNAL_POST 3RSM "Nov 26, 2017"
7 .SH NAME
8 rsm_intr_signal_post, rsm_intr_signal_wait \- signal or wait for an event
9 .SH SYNOPSIS
10 .LP
11 .nf
12 cc [ \fIflag\fR... ] \fIfile\fR... -lrsm [ \fIlibrary\fR... ]
13 #include <rsmapi.h>
15 \fBint\fR \fBrsm_intr_signal_post\fR(\fBvoid *\fR\fImemseg\fR, \fBuint_t\fR \fIflags\fR);
16 .fi
18 .LP
19 .nf
20 \fBint\fR \fBrsm_intr_signal_wait\fR(\fBvoid *\fR\fImemseg\fR, \fBint\fR \fItimeout\fR);
21 .fi
23 .SH DESCRIPTION
24 .LP
25 The  \fBrsm_intr_signal_post()\fR and  \fBrsm_intr_signal_wait()\fR functions
26 are event functions that allow synchronization between importer processes and
27 exporter processes.  A process may block to wait for an event occurrence by
28 calling \fBrsm_intr_signal_wait()\fR. A process can signal a waiting process
29 when an event occurs by calling \fBrsm_intr_signal_post()\fR.
30 .sp
31 .LP
32 The \fBrsm_intr_signal_post()\fR function signals an event occurrence. Either an
33 import segment handle (\fBrsm_memseg_import_handle_t\fR) or an export segment
34 handle (\fBrsm_memseg_export_handle_t\fR) may be type cast to a void pointer
35 for the \fImemseg\fR argument. If \fImemseg\fR refers to an import handle, the
36 exporting process is signalled. If \fImemseg\fR refers to an export handle, all
37 importers of that segment are signalled. The \fIflags\fR argument may be set to
38 \fBRSM_SIGPOST_NO_ACCUMULATE\fR; this will cause this event to be discarded if
39 an event is already pending for the target segment.
40 .sp
41 .LP
42 The \fBrsm_intr_signal_wait()\fR function allows a process to block and wait
43 for an event occurrence. Either an import segment handle
44 (\fBrsm_memseg_import_handle_t\fR) or an export segment handle
45 (\fBrsm_memseg_export_handle_t\fR) may be type cast to a void pointer for the
46 \fImemseg\fR argument. The process blocks for up to \fItimeout\fR milliseconds
47 for an event to occur; if the timeout value is -1, the process blocks until an
48 event occurs or until interrupted.
49 .SH RETURN VALUES
50 .LP
51 Upon successful completion, these functions return 0.  Otherwise, an error
52 value is returned to indicate the error.
53 .SH ERRORS
54 .LP
55 The \fBrsm_intr_signal_post()\fR and  \fBrsm_intr_signal_wait()\fR functions
56 can return the following error:
57 .sp
58 .ne 2
59 .na
60 \fB\fBRSMERR_BAD_SEG_HNDL\fR \fR
61 .ad
62 .RS 24n
63 Invalid segment handle.
64 .RE
66 .sp
67 .LP
68 The \fBrsm_intr_signal_post()\fR function can return the following error:
69 .sp
70 .ne 2
71 .na
72 \fB\fBRSMERR_CONN_ABORTED\fR \fR
73 .ad
74 .sp .6
75 .RS 4n
76 Connection aborted.
77 .RE
79 .sp
80 .ne 2
81 .na
82 \fB\fBRSMERR_REMOTE_NODE_UNREACHABLE\fR \fR
83 .ad
84 .sp .6
85 .RS 4n
86 Remote node not reachable.
87 .RE
89 .sp
90 .LP
91 The \fBrsm_intr_signal_wait()\fR function can return the following errors:
92 .sp
93 .ne 2
94 .na
95 \fB\fBRSMERR_INTERRUPTED\fR \fR
96 .ad
97 .RS 23n
98 Wait interrupted.
99 .RE
102 .ne 2
104 \fB\fBRSMERR_TIMEOUT\fR \fR
106 .RS 23n
107 Timer expired.
110 .SH ATTRIBUTES
112 See \fBattributes\fR(5) for descriptions of the following attributes:
117 box;
118 l | l
119 l | l .
120 ATTRIBUTE TYPE  ATTRIBUTE VALUE
122 Interface Stability     Evolving
124 MT-Level        MT-Safe
127 .SH SEE ALSO
129 \fBrsm_memseg_get_pollfd\fR(3RSM), \fBattributes\fR(5)