File tree 1 file changed +16
-15
lines changed
1 file changed +16
-15
lines changed Original file line number Diff line number Diff line change 11735
11735
11736
11736
// \ref {saferecl.rcu.domain }, class \tcode {rcu_domain}
11737
11737
class rcu_domain;
11738
+
11739
+ // \ref {saferecl.rcu.domain.func } non-member functions
11738
11740
rcu_domain& rcu_default_domain() noexcept;
11739
11741
void rcu_synchronize(rcu_domain& dom = rcu_default_domain()) noexcept;
11740
11742
void rcu_barrier(rcu_domain& dom = rcu_default_domain()) noexcept;
@@ -11828,31 +11830,30 @@
11828
11830
11829
11831
\rSec 4[saferecl.rcu.domain.general]{General}
11830
11832
11833
+ \begin {codeblock }
11834
+ namespace std {
11835
+ class rcu_domain {
11836
+ public:
11837
+ rcu_domain(const rcu_domain&) = delete;
11838
+ rcu_domain& operator=(const rcu_domain&) = delete;
11839
+
11840
+ void lock() noexcept;
11841
+ bool try_lock() noexcept;
11842
+ void unlock() noexcept;
11843
+ };
11844
+ }
11845
+ \end {codeblock }
11846
+
11831
11847
\pnum
11832
11848
This class meets the requirements of
11833
11849
\oldconcept {Lockable}\iref {thread.req.lockable.req } and
11834
11850
provides regions of RCU protection.
11835
-
11836
11851
\begin {example }
11837
11852
\begin {codeblock }
11838
11853
std::scoped_lock<rcu_domain> rlock(rcu_default_domain());
11839
11854
\end {codeblock }
11840
11855
\end {example }
11841
11856
11842
- \begin {codeblock }
11843
- class rcu_domain {
11844
- public:
11845
- rcu_domain(const rcu_domain&) = delete;
11846
- rcu_domain& operator=(const rcu_domain&) = delete;
11847
-
11848
- void lock() noexcept;
11849
- bool try_lock() noexcept;
11850
- void unlock() noexcept;
11851
- };
11852
-
11853
- rcu_domain& rcu_default_domain() noexcept;
11854
- \end {codeblock }
11855
-
11856
11857
\pnum
11857
11858
The functions \tcode {lock} and \tcode {unlock} establish
11858
11859
(possibly nested) regions of RCU protection.
You can’t perform that action at this time.
0 commit comments