2 .\" Copyright (c) 1995 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 _LWP_COND_SIGNAL 2 "Dec 8, 1995"
8 _lwp_cond_signal, _lwp_cond_broadcast \- signal a condition variable
14 \fBint\fR \fB_lwp_cond_signal\fR(\fBlwp_cond_t *\fR\fIcvp\fR);
19 \fBint\fR \fB_lwp_cond_broadcast\fR(\fBlwp_cond_t *\fR\fIcvp\fR);
25 The \fB_lwp_cond_signal()\fR function unblocks one LWP that is blocked on the
26 LWP condition variable pointed to by \fIcvp\fR.
29 The \fB_lwp_cond_broadcast()\fR function unblocks all LWPs that are blocked on
30 the LWP condition variable pointed to by \fIcvp\fR.
33 If no LWPs are blocked on the LWP condition variable, then
34 \fB_lwp_cond_signal()\fR and \fB_lwp_cond_broadcast()\fR have no effect.
37 Both functions should be called under the protection of the same LWP mutex lock
38 that is used with the LWP condition variable being signaled. Otherwise, the
39 condition variable may be signalled between the test of the associated
40 condition and blocking in \fB_lwp_cond_wait()\fR. This can cause an infinite
45 Upon successful completion, \fB0\fR is returned. A non-zero value indicates an
50 The \fB_lwp_cond_signal()\fR and \fB_lwp_cond_broadcast()\fR functions will
58 The \fIcvp\fR argument points to an invalid LWP condition variable.
67 The \fIcvp\fR argument points to an invalid address.
73 \fB_lwp_cond_wait\fR(2), \fB_lwp_mutex_lock\fR(2)