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

NAME

12       pthread_spin_unlock — unlock a spin lock object
13

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

EXAMPLES

45       None.
46

APPLICATION USAGE

48       None.
49

RATIONALE

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

FUTURE DIRECTIONS

62       None.
63

SEE ALSO

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