8999 SMBIOS: cleanup 32-bit specific code
[unleashed.git] / usr / src / man / man3c / pthread_spin_unlock.3c
blob8fa5bd569cfde0785f94279f22077272a1361daf
1 '\" te
2 .\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved.
3 .\" Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
4 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
6 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
7 .\"  This notice shall appear on any product containing this material.
8 .\" 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.
9 .\" 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.
10 .\" 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]
11 .TH PTHREAD_SPIN_UNLOCK 3C "Jan 30, 2004"
12 .SH NAME
13 pthread_spin_unlock \- unlock a spin lock object
14 .SH SYNOPSIS
15 .LP
16 .nf
17 cc \fB-mt\fR [ \fIflag\fR... ] \fIfile\fR... [ \fIlibrary\fR... ]
18 #include <pthread.h>
20 \fBint\fR \fBpthread_spin_unlock\fR(\fBpthread_spinlock_t *\fR\fIlock\fR);
21 .fi
23 .SH DESCRIPTION
24 .sp
25 .LP
26 The \fBpthread_spin_unlock()\fR function releases the spin lock referenced by
27 \fIlock\fR which was locked with the \fBpthread_spin_lock\fR(3C) or
28 \fBpthread_spin_trylock\fR(3C) functions. The results are undefined if the lock
29 is not held by the calling thread. If there are threads spinning on the lock
30 when \fBpthread_spin_unlock()\fR is called, the lock becomes available and an
31 unspecified spinning thread acquires the lock.
32 .sp
33 .LP
34 The results are undefined if this function is called with an uninitialized
35 thread spin lock.
36 .SH RETURN VALUES
37 .sp
38 .LP
39 Upon successful completion, the \fBpthread_spin_unlock()\fR function returns 0.
40 Otherwise, an error number shall be returned to indicate the error.
41 .SH ERRORS
42 .sp
43 .LP
44 The \fBpthread_spin_unlock()\fR function will fail if:
45 .sp
46 .ne 2
47 .na
48 \fB\fBEINVAL\fR\fR
49 .ad
50 .RS 10n
51 An invalid argument was specified.
52 .RE
54 .sp
55 .ne 2
56 .na
57 \fB\fBEPERM\fR\fR
58 .ad
59 .RS 10n
60 The calling thread does not hold the lock.
61 .RE
63 .SH ATTRIBUTES
64 .sp
65 .LP
66 See \fBattributes\fR(5) for descriptions of the following attributes:
67 .sp
69 .sp
70 .TS
71 box;
72 c | c
73 l | l .
74 ATTRIBUTE TYPE  ATTRIBUTE VALUE
76 Interface Stability     Standard
78 MT-Level        MT-Safe
79 .TE
81 .SH SEE ALSO
82 .sp
83 .LP
84 \fBpthread_spin_destroy\fR(3C), \fBpthread_spin_lock\fR(3C),
85 \fBattributes\fR(5), \fBstandards\fR(5)