tmp/tmpwsm1xuea/{from.md → to.md}
RENAMED
|
@@ -2,86 +2,97 @@
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
void lock();
|
| 5 |
```
|
| 6 |
|
| 7 |
-
*Effects:* `pm->lock_shared()`.
|
| 8 |
|
| 9 |
*Postconditions:* `owns == true`.
|
| 10 |
|
| 11 |
-
*Throws:* Any exception thrown by `pm->lock_shared()`. `system_error`
|
| 12 |
-
an exception is required ([[thread.req.exception]]).
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
| 16 |
|
| 17 |
``` cpp
|
| 18 |
bool try_lock();
|
| 19 |
```
|
| 20 |
|
| 21 |
-
*Effects:* `pm->try_lock_shared()`.
|
| 22 |
|
| 23 |
*Returns:* The value returned by the call to `pm->try_lock_shared()`.
|
| 24 |
|
| 25 |
*Postconditions:* `owns == res`, where `res` is the value returned by
|
| 26 |
the call to `pm->try_lock_shared()`.
|
| 27 |
|
| 28 |
*Throws:* Any exception thrown by `pm->try_lock_shared()`.
|
| 29 |
-
`system_error`
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
template <class Clock, class Duration>
|
| 36 |
bool
|
| 37 |
try_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
|
| 38 |
```
|
| 39 |
|
| 40 |
-
*Effects:* `pm->try_lock_shared_until(abs_time)`.
|
| 41 |
|
| 42 |
*Returns:* The value returned by the call to
|
| 43 |
`pm->try_lock_shared_until(abs_time)`.
|
| 44 |
|
| 45 |
*Postconditions:* `owns == res`, where `res` is the value returned by
|
| 46 |
the call to `pm->try_lock_shared_until(abs_time)`.
|
| 47 |
|
| 48 |
*Throws:* Any exception thrown by `pm->try_lock_shared_until(abs_time)`.
|
| 49 |
-
`system_error`
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
``` cpp
|
| 55 |
template <class Rep, class Period>
|
| 56 |
bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
|
| 57 |
```
|
| 58 |
|
| 59 |
-
*Effects:* `pm->try_lock_shared_for(rel_time)`.
|
| 60 |
|
| 61 |
*Returns:* The value returned by the call to
|
| 62 |
`pm->try_lock_shared_for(rel_time)`.
|
| 63 |
|
| 64 |
*Postconditions:* `owns == res`, where `res` is the value returned by
|
| 65 |
the call to `pm->try_lock_shared_for(rel_time)`.
|
| 66 |
|
| 67 |
*Throws:* Any exception thrown by `pm->try_lock_shared_for(rel_time)`.
|
| 68 |
-
`system_error`
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
``` cpp
|
| 74 |
void unlock();
|
| 75 |
```
|
| 76 |
|
| 77 |
-
*Effects:* `pm->unlock_shared()`.
|
| 78 |
|
| 79 |
*Postconditions:* `owns == false`.
|
| 80 |
|
| 81 |
-
*Throws:* `system_error` when an exception is
|
| 82 |
-
([[thread.req.exception]]).
|
| 83 |
|
| 84 |
*Error conditions:*
|
| 85 |
|
| 86 |
- `operation_not_permitted` — if on entry `owns` is `false`.
|
| 87 |
|
|
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
void lock();
|
| 5 |
```
|
| 6 |
|
| 7 |
+
*Effects:* As if by `pm->lock_shared()`.
|
| 8 |
|
| 9 |
*Postconditions:* `owns == true`.
|
| 10 |
|
| 11 |
+
*Throws:* Any exception thrown by `pm->lock_shared()`. `system_error`
|
| 12 |
+
when an exception is required ([[thread.req.exception]]).
|
| 13 |
+
|
| 14 |
+
*Error conditions:*
|
| 15 |
+
|
| 16 |
+
- `operation_not_permitted` — if `pm` is `nullptr`.
|
| 17 |
+
- `resource_deadlock_would_occur` — if on entry `owns` is `true`.
|
| 18 |
|
| 19 |
``` cpp
|
| 20 |
bool try_lock();
|
| 21 |
```
|
| 22 |
|
| 23 |
+
*Effects:* As if by `pm->try_lock_shared()`.
|
| 24 |
|
| 25 |
*Returns:* The value returned by the call to `pm->try_lock_shared()`.
|
| 26 |
|
| 27 |
*Postconditions:* `owns == res`, where `res` is the value returned by
|
| 28 |
the call to `pm->try_lock_shared()`.
|
| 29 |
|
| 30 |
*Throws:* Any exception thrown by `pm->try_lock_shared()`.
|
| 31 |
+
`system_error` when an exception is
|
| 32 |
+
required ([[thread.req.exception]]).
|
| 33 |
+
|
| 34 |
+
*Error conditions:*
|
| 35 |
+
|
| 36 |
+
- `operation_not_permitted` — if `pm` is `nullptr`.
|
| 37 |
+
- `resource_deadlock_would_occur` — if on entry `owns` is `true`.
|
| 38 |
|
| 39 |
``` cpp
|
| 40 |
template <class Clock, class Duration>
|
| 41 |
bool
|
| 42 |
try_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
|
| 43 |
```
|
| 44 |
|
| 45 |
+
*Effects:* As if by `pm->try_lock_shared_until(abs_time)`.
|
| 46 |
|
| 47 |
*Returns:* The value returned by the call to
|
| 48 |
`pm->try_lock_shared_until(abs_time)`.
|
| 49 |
|
| 50 |
*Postconditions:* `owns == res`, where `res` is the value returned by
|
| 51 |
the call to `pm->try_lock_shared_until(abs_time)`.
|
| 52 |
|
| 53 |
*Throws:* Any exception thrown by `pm->try_lock_shared_until(abs_time)`.
|
| 54 |
+
`system_error` when an exception is
|
| 55 |
+
required ([[thread.req.exception]]).
|
| 56 |
+
|
| 57 |
+
*Error conditions:*
|
| 58 |
+
|
| 59 |
+
- `operation_not_permitted` — if `pm` is `nullptr`.
|
| 60 |
+
- `resource_deadlock_would_occur` — if on entry `owns` is `true`.
|
| 61 |
|
| 62 |
``` cpp
|
| 63 |
template <class Rep, class Period>
|
| 64 |
bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
|
| 65 |
```
|
| 66 |
|
| 67 |
+
*Effects:* As if by `pm->try_lock_shared_for(rel_time)`.
|
| 68 |
|
| 69 |
*Returns:* The value returned by the call to
|
| 70 |
`pm->try_lock_shared_for(rel_time)`.
|
| 71 |
|
| 72 |
*Postconditions:* `owns == res`, where `res` is the value returned by
|
| 73 |
the call to `pm->try_lock_shared_for(rel_time)`.
|
| 74 |
|
| 75 |
*Throws:* Any exception thrown by `pm->try_lock_shared_for(rel_time)`.
|
| 76 |
+
`system_error` when an exception is
|
| 77 |
+
required ([[thread.req.exception]]).
|
| 78 |
+
|
| 79 |
+
*Error conditions:*
|
| 80 |
+
|
| 81 |
+
- `operation_not_permitted` — if `pm` is `nullptr`.
|
| 82 |
+
- `resource_deadlock_would_occur` — if on entry `owns` is `true`.
|
| 83 |
|
| 84 |
``` cpp
|
| 85 |
void unlock();
|
| 86 |
```
|
| 87 |
|
| 88 |
+
*Effects:* As if by `pm->unlock_shared()`.
|
| 89 |
|
| 90 |
*Postconditions:* `owns == false`.
|
| 91 |
|
| 92 |
+
*Throws:* `system_error` when an exception is
|
| 93 |
+
required ([[thread.req.exception]]).
|
| 94 |
|
| 95 |
*Error conditions:*
|
| 96 |
|
| 97 |
- `operation_not_permitted` — if on entry `owns` is `false`.
|
| 98 |
|