Print this page
10067 Miscellaneous man page typos
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Volker A. Brandt <vab@bb-c.de>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3c/pthread_rwlock_rdlock.3c.man.txt
+++ new/usr/src/man/man3c/pthread_rwlock_rdlock.3c.man.txt
1 1 PTHREAD_RWLOCK_RDLOCK(3C) Standard C Library Functions
2 2
3 3
4 4
5 5 NAME
6 6 pthread_rwlock_rdlock, pthread_rwlock_tryrdlock - lock or attempt to
7 7 lock read-write lock object for reading
8 8
9 9 SYNOPSIS
10 10 cc -mt [ flag... ] file... -lpthread [ library... ]
11 11 #include <pthread.h>
12 12
13 13 int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock);
14 14
15 15
16 16 int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock);
17 17
18 18
19 19 DESCRIPTION
20 20 The pthread_rwlock_rdlock() function applies a read lock to the read-
21 21 write lock referenced by rwlock. The calling thread acquires the read
22 22 lock if a writer does not hold the lock and there are no writers
23 23 blocked on the lock.
24 24
25 25
26 26 The calling thread does not acquire the lock if a writer holds the lock
27 27 or if writers of higher or equal priority are blocked on the lock;
28 28 otherwise, the calling thread acquires the lock. If the read lock is
29 29 not acquired, the calling thread blocks until it can acquire the lock.
30 30
31 31
32 32 A thread can hold multiple concurrent read locks on rwlock (that is,
33 33 successfully call the pthread_rwlock_rdlock() function n times). If so,
34 34 the thread must perform matching unlocks (that is, it must call the
35 35 pthread_rwlock_unlock() function n times).
36 36
37 37
38 38 The maximum number of concurrent read locks that a thread can hold on
↓ open down ↓ |
38 lines elided |
↑ open up ↑ |
39 39 one read-write lock is currently set at 100,000, though this number
40 40 could change in a future release. There is no imposed limit on the
41 41 number of different threads that can apply a read lock to one read-
42 42 write lock.
43 43
44 44
45 45 The pthread_rwlock_tryrdlock() function applies a read lock like the
46 46 pthread_rwlock_rdlock() function, with the exception that the function
47 47 fails if the equivalent pthread_rwlock_rdlock() call would have blocked
48 48 the calling thread. In no case will the pthread_rwlock_tryrdlock()
49 - function ever bloc. It always either acquires the lock or fails and
49 + function ever block. It always either acquires the lock or fails and
50 50 returns immediately.
51 51
52 52
53 53 Results are undefined if any of these functions are called with an
54 54 uninitialized read-write lock.
55 55
56 56
57 57 If a signal is delivered to a thread waiting for a read-write lock for
58 58 reading, upon return from the signal handler the thread resumes waiting
59 59 for the read-write lock for reading as if it was not interrupted.
60 60
61 61 RETURN VALUES
62 62 If successful, the pthread_rwlock_rdlock() function returns 0.
63 63 Otherwise, an error number is returned to indicate the error.
64 64
65 65
66 66 The pthread_rwlock_tryrdlock() function returns 0 if the lock for
67 67 reading on the read-write lock object referenced by rwlock is acquired.
68 68 Otherwise an error number is returned to indicate the error.
69 69
70 70 ERRORS
71 71 The pthread_rwlock_rdlock() and pthread_rwlock_tryrdlock() functions
72 72 will fail if:
73 73
74 74 EAGAIN
75 75 The read lock could not be acquired because the maximum
76 76 number of read locks by the current thread for rwlock has
77 77 been exceeded.
78 78
79 79
80 80
81 81 The pthread_rwlock_rdlock() function will fail if:
82 82
83 83 EDEADLK
84 84 The current thread already owns the read-write lock for
85 85 writing.
86 86
87 87
88 88
89 89 The pthread_rwlock_tryrdlock() function will fail if:
90 90
91 91 EBUSY
92 92 The read-write lock could not be acquired for reading because
93 93 a writer holds the lock or a writer with the appropriate
94 94 priority was blocked on it.
95 95
96 96
97 97 ATTRIBUTES
98 98 See attributes(5) for descriptions of the following attributes:
99 99
100 100
101 101
102 102
103 103 +--------------------+-----------------+
104 104 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
105 105 +--------------------+-----------------+
106 106 |Interface Stability | Standard |
107 107 +--------------------+-----------------+
108 108 |MT-Level | MT-Safe |
109 109 +--------------------+-----------------+
110 110
111 111 SEE ALSO
112 112 pthread_rwlock_init(3C), pthread_rwlock_wrlock(3C),
113 113 pthread_rwlockattr_init(3C), pthread_rwlock_unlock(3C), attributes(5),
114 114 standards(5)
115 115
116 116
117 117
118 118 March 23, 2005 PTHREAD_RWLOCK_RDLOCK(3C)
↓ open down ↓ |
59 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX