tmp/tmpvkvyz4w6/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### General <a id="saferecl.rcu.general">[[saferecl.rcu.general]]</a>
|
| 2 |
+
|
| 3 |
+
RCU is a synchronization mechanism that can be used for linked data
|
| 4 |
+
structures that are frequently read, but seldom updated. RCU does not
|
| 5 |
+
provide mutual exclusion, but instead allows the user to schedule
|
| 6 |
+
specified actions such as deletion at some later time.
|
| 7 |
+
|
| 8 |
+
A class type `T` is *rcu-protectable* if it has exactly one base class
|
| 9 |
+
of type `rcu_obj_base<T, D>` for some `D`, and that base is public and
|
| 10 |
+
non-virtual, and it has no base classes of type `rcu_obj_base<X, Y>` for
|
| 11 |
+
any other combination `X`, `Y`. An object is rcu-protectable if it is of
|
| 12 |
+
rcu-protectable type.
|
| 13 |
+
|
| 14 |
+
An invocation of `unlock` U on an `rcu_domain dom` corresponds to an
|
| 15 |
+
invocation of `lock` L on `dom` if L is sequenced before U and either
|
| 16 |
+
|
| 17 |
+
- no other invocation of `lock` on `dom` is sequenced after L and before
|
| 18 |
+
U, or
|
| 19 |
+
- every invocation of `unlock` U2 on `dom` such that L is sequenced
|
| 20 |
+
before U2 and U2 is sequenced before U corresponds to an invocation of
|
| 21 |
+
`lock` L2 on `dom` such that L is sequenced before L2 and L2 is
|
| 22 |
+
sequenced before U2.
|
| 23 |
+
|
| 24 |
+
[*Note 1*: This pairs nested locks and unlocks on a given domain in
|
| 25 |
+
each thread. — *end note*]
|
| 26 |
+
|
| 27 |
+
A *region of RCU protection* on a domain `dom` starts with a `lock` L on
|
| 28 |
+
`dom` and ends with its corresponding `unlock` U.
|
| 29 |
+
|
| 30 |
+
Given a region of RCU protection R on a domain `dom` and given an
|
| 31 |
+
evaluation E that scheduled another evaluation F in `dom`, if E does not
|
| 32 |
+
strongly happen before the start of R, the end of R strongly happens
|
| 33 |
+
before evaluating F.
|
| 34 |
+
|
| 35 |
+
The evaluation of a scheduled evaluation is potentially concurrent with
|
| 36 |
+
any other scheduled evaluation. Each scheduled evaluation is evaluated
|
| 37 |
+
at most once.
|
| 38 |
+
|