Skip to content

Commit 8d787a2

Browse files
committed
[saferecl.rcu.domain] Minor reogranization
In [.general, move all paragraphs below the class synopsis, add "namespace std" to the class synopsis, and remove repeated declaration of "rcu_default_domain". Add a cross reference to [.func] to the header synopsis.
1 parent 3608a50 commit 8d787a2

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

source/threads.tex

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11735,6 +11735,8 @@
1173511735

1173611736
// \ref{saferecl.rcu.domain}, class \tcode{rcu_domain}
1173711737
class rcu_domain;
11738+
11739+
// \ref{saferecl.rcu.domain.func} non-member functions
1173811740
rcu_domain& rcu_default_domain() noexcept;
1173911741
void rcu_synchronize(rcu_domain& dom = rcu_default_domain()) noexcept;
1174011742
void rcu_barrier(rcu_domain& dom = rcu_default_domain()) noexcept;
@@ -11828,31 +11830,30 @@
1182811830

1182911831
\rSec4[saferecl.rcu.domain.general]{General}
1183011832

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+
1183111847
\pnum
1183211848
This class meets the requirements of
1183311849
\oldconcept{Lockable}\iref{thread.req.lockable.req} and
1183411850
provides regions of RCU protection.
11835-
1183611851
\begin{example}
1183711852
\begin{codeblock}
1183811853
std::scoped_lock<rcu_domain> rlock(rcu_default_domain());
1183911854
\end{codeblock}
1184011855
\end{example}
1184111856

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-
1185611857
\pnum
1185711858
The functions \tcode{lock} and \tcode{unlock} establish
1185811859
(possibly nested) regions of RCU protection.

0 commit comments

Comments
 (0)