1pthread_spin_unlock(3C)  Standard C Library Functions  pthread_spin_unlock(3C)
2
3
4

NAME

6       pthread_spin_unlock - unlock a spin lock object
7

SYNOPSIS

9       cc -mt [ flag... ] file... [ library... ]
10       #include <pthread.h>
11
12       int pthread_spin_unlock(pthread_spinlock_t *lock);
13
14

DESCRIPTION

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

RETURN VALUES

28       Upon  successful completion, the pthread_spin_unlock() function returns
29       0. Otherwise, an error number shall be returned to indicate the error.
30

ERRORS

32       The pthread_spin_unlock() function will fail if:
33
34       EINVAL    An invalid argument was specified.
35
36
37       EPERM     The calling thread does not hold the lock.
38
39

ATTRIBUTES

41       See attributes(5) for descriptions of the following attributes:
42
43
44
45
46       ┌─────────────────────────────┬─────────────────────────────┐
47       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
48       ├─────────────────────────────┼─────────────────────────────┤
49       │Interface Stability          │Standard                     │
50       ├─────────────────────────────┼─────────────────────────────┤
51       │MT-Level                     │MT-Safe                      │
52       └─────────────────────────────┴─────────────────────────────┘
53

SEE ALSO

55       pthread_spin_destroy(3C), pthread_spin_lock(3C),  attributes(5),  stan‐
56       dards(5)
57
58
59
60SunOS 5.11                        30 Jan 2004          pthread_spin_unlock(3C)
Impressum