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_timedwrlock.3c.man.txt
+++ new/usr/src/man/man3c/pthread_rwlock_timedwrlock.3c.man.txt
1 1 PTHREAD_RWLOCK_TIMEDWRLOCK(3C) Standard C Library Functions
2 2
3 3
4 4
5 5 NAME
6 6 pthread_rwlock_timedwrlock, pthread_rwlock_reltimedwrlock_np - lock a
7 7 read-write lock for writing
8 8
9 9 SYNOPSIS
10 10 cc -mt [ flag... ] file... [ library... ]
11 11 #include <pthread.h>
12 12 #include <time.h>
13 13
14 14 int pthread_rwlock_timedwrlock(pthread_rwlock_t *restrict rwlock,
15 15 const struct timespec *restrict abs_timeout);
16 16
17 17
18 18 int pthread_rwlock_reltimedwrlock_np(pthread_rwlock_t *restrict rwlock,
19 19 const struct timespec *restrict rel_timeout);
20 20
21 21
22 22 DESCRIPTION
23 23 The pthread_rwlock_timedwrlock() function applies a write lock to the
24 24 read-write lock referenced by rwlock as in the
25 25 pthread_rwlock_wrlock(3C) function. If the lock cannot be acquired
26 26 without waiting for other threads to unlock the lock, this wait will be
27 27 terminated when the specified timeout expires. The timeout expires when
28 28 the absolute time specified by abs_timeout passes, as measured by the
29 29 CLOCK_REALTIME clock (that is, when the value of that clock equals or
30 30 exceeds abs_timeout), or if the absolute time specified by abs_timeout
31 31 has already been passed at the time of the call.
32 32
33 33
34 34 The pthread_rwlock_reltimedwrlock_np() function is identical to the
35 35 pthread_rwlock_timedwrlock() function, except that the timeout is
36 36 specified as a relative time interval. The timeout expires when the
37 37 time interval specified by rel_timeout passes, as measured by the
38 38 CLOCK_REALTIME clock, or if the time interval specified by rel_timeout
39 39 is negative at the time of the call.
40 40
41 41
42 42 The resolution of the timeout is the resolution of the CLOCK_REALTIME
43 43 clock. The timespec data type is defined in the <time.h> header. Under
44 44 no circumstances does either function fail with a timeout if the lock
45 45 can be acquired immediately. The validity of the abs_timeout parameter
46 46 need not be checked if the lock can be immediately acquired.
47 47
48 48
49 49 If a signal that causes a signal handler to be executed is delivered to
50 50 a thread blocked on a read- write lock with a call to
51 51 pthread_rwlock_timedwrlock() or pthread_rwlock_reltimedwrlock_np(),
52 52 upon return from the signal handler the thread resumes waiting for the
53 53 lock as if it was not interrupted.
54 54
55 55
56 56 The calling thread can deadlock if at the time the call is made it
57 57 holds the read-write lock. The results are undefined if this function
58 58 is called with an uninitialized read-write lock.
59 59
60 60 RETURN VALUES
61 61 The pthread_rwlock_timedwrlock() and pthread_rwlock_reltimedwrlock_np()
62 62 functions return 0 if the lock for writing on the read-write lock
63 63 object referenced by rwlock is acquired. Otherwise, an error number is
64 64 returned to indicate the error.
65 65
66 66 ERRORS
67 67 The pthread_rwlock_timedwrlock() and pthread_rwlock_reltimedwrlock_np()
68 68 functions will fail if:
69 69
70 70 ETIMEDOUT
71 71 The lock could not be acquired before the specified
72 72 timeout expired.
73 73
74 74
75 75
76 76 The pthread_rwlock_timedwrlock() and pthread_rwlock_reltimedwrlock_np()
77 77 functions may fail if:
78 78
79 79 EDEADLK
80 80 The calling thread already holds the rwlock.
81 81
82 82
83 83 EINVAL
84 84 The value specified by rwlock does not refer to an
85 85 initialized read-write lock object, or the timeout
86 86 nanosecond value is less than zero or greater than or equal
87 87 to 1,000 million.
88 88
89 89
90 90 ATTRIBUTES
91 91 See attributes(5) for descriptions of the following attributes:
92 92
93 93
94 94
95 95
96 96 +--------------------+-----------------+
97 97 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
98 98 +--------------------+-----------------+
99 99 |Interface Stability | See below. |
100 100 +--------------------+-----------------+
101 101 |MT-Level | MT-Safe |
102 102 +--------------------+-----------------+
103 103
104 104
105 105 The pthread_rwlock_timedwrlock() function is Standard. The
106 106 pthread_rwlock_reltimedwrlock_np() function is Stable.
107 107
108 108 SEE ALSO
109 109 pthread_rwlock_destroy(3C), pthread_rwlock_rdlock(3C),
110 110 pthread_rwlock_timedrdlock(3C), pthread_rwlock_trywrlock(3C),
111 111 pthread_rwlock_unlock(3C), pthread_rwlock_wrlock(3C), attributes(5),
112 112 standards(5)
113 113
114 114
115 115
116 116 January 30, 2004 PTHREAD_RWLOCK_TIMEDWRLOCK(3C)
↓ open down ↓ |
116 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX