Print this page
11586 NAME field in man pages should match what's installed
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3c/pthread_mutexattr_getrobust.3c.man.txt
+++ new/usr/src/man/man3c/pthread_mutexattr_getrobust.3c.man.txt
1 1 PTHREAD_MUTEXATTR_GETROBUST(3C) Standard C Library Functions
2 2
3 3 NAME
4 - pthread_mutexattr_getrobust, pthrad_mutexattr_setrobust - get and set the
5 - mutex robust attribute
4 + pthread_mutexattr_getrobust, pthread_mutexattr_setrobust - get and set
5 + the mutex robust attribute
6 6
7 7 SYNOPSIS
8 8 #include <pthread.h>
9 9
10 10 int
11 11 pthread_mutexattr_getrobust(const pthread_mutexattr_t *attr,
12 12 int *robust);
13 13
14 14 int
15 15 pthread_mutexattr_setrobust(pthread_mutexattr_t *attr, int robust);
16 16
17 17 DESCRIPTION
18 18 The pthread_mutexattr_getrobust() and pthread_mtuexattr_setrobust()
19 19 functions obtain and set a mutex's robust attribute, putting it in, or
20 20 obtaining it from robust. The valid values for robust include:
21 21
22 22 PTHREAD_MUTEX_STALLED
23 23 The mutex referred to by attr is a traditional mutex. When
24 24 a thread holding an intra-process lock or a process holding
25 25 an inter-process lock crashes or terminates without
26 26 unlocking the mutex, then the lock will be stalled. For
27 27 another thread or process to obtain the lock, something
28 28 else must unlock it.
29 29
30 30 PTHREAD_MUTEX_ROBUST
31 31 The mutex referred to by attr is considered a robust mutex.
32 32 When a process holding an inter-process lock crashes or
33 33 terminates without unlocking the mutex, the attempt to lock
34 34 it will return EOWNERDEAD. This allows the new owner the
35 35 chance to fix the internal state and call
36 36 pthread_mutex_consistent(3C) prior to unlocking the lock,
37 37 allowing normal operation to proceed. Any crashes while in
38 38 this state cause the next owner to obtain EOWNERDEAD.
39 39
40 40 RETURN VALUES
41 41 Upon successful completion, the pthread_mutexattr_getrobust() function
42 42 will return 0 and update robust with the current value of the robust
43 43 attribute. Upon successful completion, the pthread_mutexattr_setrobust()
44 44 function will return 0 and update the robust property of the attributes
45 45 pointed to by attr to robust. If either function fails, an error code
46 46 will be returned to indicate the error. Valid errors are defined below.
47 47
48 48 ERRORS
49 49 The pthread_mutexattr_getrobust() function will fail if:
50 50
51 51 EINVAL attr is invalid or a null pointer, robust is a null
52 52 pointer.
53 53
54 54 The pthread_mutexattr_setrobust() function will fail if:
55 55
56 56 EINVAL attr is invalid or a null pointer, robust is not one
57 57 of PTHREAD_MUTEX_STALLED or PTHREAD_MUTEX_ROBUST.
58 58
↓ open down ↓ |
43 lines elided |
↑ open up ↑ |
59 59 INTERFACE STABILITY
60 60 Committed
61 61
62 62 MT-LEVEL
63 63 MT-Safe
64 64
65 65 SEE ALSO
66 66 pthread_mutex_consistent(3C), pthread(3HEAD), libpthread(3LIB),
67 67 attributes(5), mutex(5)
68 68
69 -illumos December 22, 2014 illumos
69 +illumos August 20, 2019 illumos
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX