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

NAME

6       pthread_spin_unlock  -  unlock  a  spin  lock object (ADVANCED REALTIME
7       THREADS)
8

SYNOPSIS

10       #include <pthread.h>
11
12       int pthread_spin_unlock(pthread_spinlock_t *lock);
13
14

DESCRIPTION

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

RETURN VALUE

27       Upon successful completion, the  pthread_spin_unlock()  function  shall
28       return  zero;  otherwise, an error number shall be returned to indicate
29       the error.
30

ERRORS

32       The pthread_spin_unlock() function may fail if:
33
34       EINVAL An invalid argument was specified.
35
36       EPERM  The calling thread does not hold the lock.
37
38
39       This function shall not return an error code of [EINTR].
40
41       The following sections are informative.
42

EXAMPLES

44       None.
45

APPLICATION USAGE

47       The pthread_spin_unlock() function is part of the Spin Locks option and
48       need not be provided on all implementations.
49

RATIONALE

51       None.
52

FUTURE DIRECTIONS

54       None.
55

SEE ALSO

57       pthread_spin_destroy()  ,  pthread_spin_lock()  ,  the Base Definitions
58       volume of IEEE Std 1003.1-2001, <pthread.h>
59
61       Portions of this text are reprinted and reproduced in  electronic  form
62       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
63       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
64       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
65       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
66       event of any discrepancy between this version and the original IEEE and
67       The Open Group Standard, the original IEEE and The Open Group  Standard
68       is  the  referee document. The original Standard can be obtained online
69       at http://www.opengroup.org/unix/online.html .
70
71
72
73IEEE/The Open Group                  2003               PTHREAD_SPIN_UNLOCK(P)
Impressum