From Jason Turner

[thread.lock.shared.cons]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpi_6dqmhb/{from.md → to.md} +11 -11
tmp/tmpi_6dqmhb/{from.md → to.md} RENAMED
@@ -16,19 +16,19 @@ explicit shared_lock(mutex_type& m);
16
  mode.
17
 
18
  *Effects:* Constructs an object of type `shared_lock` and calls
19
  `m.lock_shared()`.
20
 
21
- *Postconditions:* `pm == &m` and `owns == true`.
22
 
23
  ``` cpp
24
  shared_lock(mutex_type& m, defer_lock_t) noexcept;
25
  ```
26
 
27
  *Effects:* Constructs an object of type `shared_lock`.
28
 
29
- *Postconditions:* `pm == &m` and `owns == false`.
30
 
31
  ``` cpp
32
  shared_lock(mutex_type& m, try_to_lock_t);
33
  ```
34
 
@@ -36,22 +36,22 @@ shared_lock(mutex_type& m, try_to_lock_t);
36
  mode.
37
 
38
  *Effects:* Constructs an object of type `shared_lock` and calls
39
  `m.try_lock_shared()`.
40
 
41
- *Postconditions:* `pm == &m` and `owns == res` where `res` is the value
42
- returned by the call to `m.try_lock_shared()`.
43
 
44
  ``` cpp
45
  shared_lock(mutex_type& m, adopt_lock_t);
46
  ```
47
 
48
  *Requires:* The calling thread has shared ownership of the mutex.
49
 
50
  *Effects:* Constructs an object of type `shared_lock`.
51
 
52
- *Postconditions:* `pm == &m` and `owns == true`.
53
 
54
  ``` cpp
55
  template <class Clock, class Duration>
56
  shared_lock(mutex_type& m,
57
  const chrono::time_point<Clock, Duration>& abs_time);
@@ -61,12 +61,12 @@ template <class Clock, class Duration>
61
  mode.
62
 
63
  *Effects:* Constructs an object of type `shared_lock` and calls
64
  `m.try_lock_shared_until(abs_time)`.
65
 
66
- *Postconditions:* `pm == &m` and `owns == res` where `res` is the value
67
- returned by the call to `m.try_lock_shared_until(abs_time)`.
68
 
69
  ``` cpp
70
  template <class Rep, class Period>
71
  shared_lock(mutex_type& m,
72
  const chrono::duration<Rep, Period>& rel_time);
@@ -76,12 +76,12 @@ template <class Rep, class Period>
76
  mode.
77
 
78
  *Effects:* Constructs an object of type `shared_lock` and calls
79
  `m.try_lock_shared_for(rel_time)`.
80
 
81
- *Postconditions:* `pm == &m` and `owns == res` where `res` is the value
82
- returned by the call to `m.try_lock_shared_for(rel_time)`.
83
 
84
  ``` cpp
85
  ~shared_lock();
86
  ```
87
 
@@ -89,19 +89,19 @@ returned by the call to `m.try_lock_shared_for(rel_time)`.
89
 
90
  ``` cpp
91
  shared_lock(shared_lock&& sl) noexcept;
92
  ```
93
 
94
- *Postconditions:* `pm == &sl_p.pm` and `owns == sl_p.owns` (where `sl_p`
95
  is the state of `sl` just prior to this construction),
96
  `sl.pm == nullptr` and `sl.owns == false`.
97
 
98
  ``` cpp
99
  shared_lock& operator=(shared_lock&& sl) noexcept;
100
  ```
101
 
102
  *Effects:* If `owns` calls `pm->unlock_shared()`.
103
 
104
- *Postconditions:* `pm == &sl_p.pm` and `owns == sl_p.owns` (where `sl_p`
105
  is the state of `sl` just prior to this assignment), `sl.pm == nullptr`
106
  and `sl.owns == false`.
107
 
 
16
  mode.
17
 
18
  *Effects:* Constructs an object of type `shared_lock` and calls
19
  `m.lock_shared()`.
20
 
21
+ *Postconditions:* `pm == addressof(m)` and `owns == true`.
22
 
23
  ``` cpp
24
  shared_lock(mutex_type& m, defer_lock_t) noexcept;
25
  ```
26
 
27
  *Effects:* Constructs an object of type `shared_lock`.
28
 
29
+ *Postconditions:* `pm == addressof(m)` and `owns == false`.
30
 
31
  ``` cpp
32
  shared_lock(mutex_type& m, try_to_lock_t);
33
  ```
34
 
 
36
  mode.
37
 
38
  *Effects:* Constructs an object of type `shared_lock` and calls
39
  `m.try_lock_shared()`.
40
 
41
+ *Postconditions:* `pm == addressof(m)` and `owns == res` where `res` is
42
+ the value returned by the call to `m.try_lock_shared()`.
43
 
44
  ``` cpp
45
  shared_lock(mutex_type& m, adopt_lock_t);
46
  ```
47
 
48
  *Requires:* The calling thread has shared ownership of the mutex.
49
 
50
  *Effects:* Constructs an object of type `shared_lock`.
51
 
52
+ *Postconditions:* `pm == addressof(m)` and `owns == true`.
53
 
54
  ``` cpp
55
  template <class Clock, class Duration>
56
  shared_lock(mutex_type& m,
57
  const chrono::time_point<Clock, Duration>& abs_time);
 
61
  mode.
62
 
63
  *Effects:* Constructs an object of type `shared_lock` and calls
64
  `m.try_lock_shared_until(abs_time)`.
65
 
66
+ *Postconditions:* `pm == addressof(m)` and `owns == res` where `res` is
67
+ the value returned by the call to `m.try_lock_shared_until(abs_time)`.
68
 
69
  ``` cpp
70
  template <class Rep, class Period>
71
  shared_lock(mutex_type& m,
72
  const chrono::duration<Rep, Period>& rel_time);
 
76
  mode.
77
 
78
  *Effects:* Constructs an object of type `shared_lock` and calls
79
  `m.try_lock_shared_for(rel_time)`.
80
 
81
+ *Postconditions:* `pm == addressof(m)` and `owns == res` where `res` is
82
+ the value returned by the call to `m.try_lock_shared_for(rel_time)`.
83
 
84
  ``` cpp
85
  ~shared_lock();
86
  ```
87
 
 
89
 
90
  ``` cpp
91
  shared_lock(shared_lock&& sl) noexcept;
92
  ```
93
 
94
+ *Postconditions:* `pm == sl_p.pm` and `owns == sl_p.owns` (where `sl_p`
95
  is the state of `sl` just prior to this construction),
96
  `sl.pm == nullptr` and `sl.owns == false`.
97
 
98
  ``` cpp
99
  shared_lock& operator=(shared_lock&& sl) noexcept;
100
  ```
101
 
102
  *Effects:* If `owns` calls `pm->unlock_shared()`.
103
 
104
+ *Postconditions:* `pm == sl_p.pm` and `owns == sl_p.owns` (where `sl_p`
105
  is the state of `sl` just prior to this assignment), `sl.pm == nullptr`
106
  and `sl.owns == false`.
107