tmp/tmpxrhz2j3s/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
##### Non-member functions <a id="saferecl.rcu.domain.func">[[saferecl.rcu.domain.func]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
rcu_domain& rcu_default_domain() noexcept;
|
| 5 |
+
```
|
| 6 |
+
|
| 7 |
+
*Returns:* A reference to a static-duration object of type `rcu_domain`.
|
| 8 |
+
A reference to the same object is returned every time this function is
|
| 9 |
+
called.
|
| 10 |
+
|
| 11 |
+
``` cpp
|
| 12 |
+
void rcu_synchronize(rcu_domain& dom = rcu_default_domain()) noexcept;
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
*Effects:* If the call to `rcu_synchronize` does not strongly happen
|
| 16 |
+
before the lock opening an RCU protection region `R` on `dom`, blocks
|
| 17 |
+
until the `unlock` closing `R` happens.
|
| 18 |
+
|
| 19 |
+
*Synchronization:* The `unlock` closing `R` strongly happens before the
|
| 20 |
+
return from `rcu_synchronize`.
|
| 21 |
+
|
| 22 |
+
``` cpp
|
| 23 |
+
void rcu_barrier(rcu_domain& dom = rcu_default_domain()) noexcept;
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
*Effects:* May evaluate any scheduled evaluations in `dom`. For any
|
| 27 |
+
evaluation that happens before the call to `rcu_barrier` and that
|
| 28 |
+
schedules an evaluation E in `dom`, blocks until E has been evaluated.
|
| 29 |
+
|
| 30 |
+
*Synchronization:* The evaluation of any such E strongly happens before
|
| 31 |
+
the return from `rcu_barrier`.
|
| 32 |
+
|
| 33 |
+
[*Note 3*: A call to `rcu_barrier` does not imply a call to
|
| 34 |
+
`rcu_synchronize` and vice versa. — *end note*]
|
| 35 |
+
|
| 36 |
+
``` cpp
|
| 37 |
+
template<class T, class D = default_delete<T>>
|
| 38 |
+
void rcu_retire(T* p, D d = D(), rcu_domain& dom = rcu_default_domain());
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
*Mandates:* `is_move_constructible_v<D>` is `true` and the expression
|
| 42 |
+
`d(p)` is well-formed.
|
| 43 |
+
|
| 44 |
+
*Preconditions:* `D` meets the *Cpp17MoveConstructible* and
|
| 45 |
+
*Cpp17Destructible* requirements.
|
| 46 |
+
|
| 47 |
+
*Effects:* May allocate memory. It is unspecified whether the memory
|
| 48 |
+
allocation is performed by invoking `operator new`. Initializes an
|
| 49 |
+
object `d1` of type `D` from `std::move(d)`. Schedules the evaluation of
|
| 50 |
+
`d1(p)` in the domain `dom`; the behavior is undefined if that
|
| 51 |
+
evaluation exits via an exception. May invoke scheduled evaluations in
|
| 52 |
+
`dom`.
|
| 53 |
+
|
| 54 |
+
[*Note 4*: If `rcu_retire` exits via an exception, no evaluation is
|
| 55 |
+
scheduled. — *end note*]
|
| 56 |
+
|
| 57 |
+
*Throws:* `bad_alloc` or any exception thrown by the initialization of
|
| 58 |
+
`d1`.
|
| 59 |
+
|
| 60 |
+
[*Note 5*: If scheduled evaluations acquire resources held across any
|
| 61 |
+
invocation of `rcu_retire` on `dom`, deadlock can occur. — *end note*]
|
| 62 |
+
|