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