1PTHREAD_SPIN_UNLOCK(3P)    POSIX Programmer's Manual   PTHREAD_SPIN_UNLOCK(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       pthread_spin_unlock — unlock a spin lock object
14

SYNOPSIS

16       #include <pthread.h>
17
18       int pthread_spin_unlock(pthread_spinlock_t *lock);
19

DESCRIPTION

21       The pthread_spin_unlock() function shall release the spin  lock  refer‐
22       enced   by  lock  which  was  locked  via  the  pthread_spin_lock()  or
23       pthread_spin_trylock() functions.
24
25       The results are undefined if the  lock  is  not  held  by  the  calling
26       thread.
27
28       If there are threads spinning on the lock when pthread_spin_unlock() is
29       called, the lock becomes available and an unspecified  spinning  thread
30       shall acquire the lock.
31
32       The results are undefined if this function is called with an uninitial‐
33       ized thread spin lock.
34

RETURN VALUE

36       Upon successful completion, the  pthread_spin_unlock()  function  shall
37       return  zero;  otherwise, an error number shall be returned to indicate
38       the error.
39

ERRORS

41       This function shall not return an error code of [EINTR].
42
43       The following sections are informative.
44

EXAMPLES

46       None.
47

APPLICATION USAGE

49       None.
50

RATIONALE

52       If an implementation detects that the value specified by the lock argu‐
53       ment  to  pthread_spin_unlock()  does  not refer to an initialized spin
54       lock object, it is recommended that the function should fail and report
55       an [EINVAL] error.
56
57       If an implementation detects that the value specified by the lock argu‐
58       ment to pthread_spin_unlock() refers to a spin lock  object  for  which
59       the  current  thread does not hold the lock, it is recommended that the
60       function should fail and report an [EPERM] error.
61

FUTURE DIRECTIONS

63       None.
64

SEE ALSO

66       pthread_spin_destroy(), pthread_spin_lock()
67
68       The Base Definitions volume of POSIX.1‐2008, Section 4.11, Memory  Syn‐
69       chronization, <pthread.h>
70
72       Portions  of  this text are reprinted and reproduced in electronic form
73       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
74       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
75       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
76       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
77       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
78       event of any discrepancy between this version and the original IEEE and
79       The Open Group Standard, the original IEEE and The Open Group  Standard
80       is  the  referee document. The original Standard can be obtained online
81       at http://www.unix.org/online.html .
82
83       Any typographical or formatting errors that appear  in  this  page  are
84       most likely to have been introduced during the conversion of the source
85       files to man page format. To report such errors,  see  https://www.ker
86       nel.org/doc/man-pages/reporting_bugs.html .
87
88
89
90IEEE/The Open Group                  2013              PTHREAD_SPIN_UNLOCK(3P)
Impressum