From 749139854cb8a9de7162ce27411ec7f3ca22499e Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Fri, 13 Aug 2021 12:51:00 -0400 Subject: [PATCH 001/114] Updates from Overleaf --- tools/check-output.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 tools/check-output.sh diff --git a/tools/check-output.sh b/tools/check-output.sh old mode 100755 new mode 100644 From 6fd5a8e53af2ce106b7bd54d175b07104d01e791 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sat, 13 May 2023 01:58:04 -0400 Subject: [PATCH 002/114] Integrated P2396R1 from Kona straw poll --- src/general.tex | 22 ++++++++++++---------- src/srHP.tex | 2 +- src/srrcu.tex | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/general.tex b/src/general.tex index eda9065..4e6cfe6 100644 --- a/src/general.tex +++ b/src/general.tex @@ -78,8 +78,9 @@ Operators in expressions are not so constrained. \end{note} -%%The header described in this document (see Table~\ref{tab:info.headers}) -%%shall import the contents of \tcode{::std::experimental::concurrency::v2} into +\pnum +These are the header described in this document (see Table~\ref{tab:info.headers}) +%%shall import the contents of %%\tcode{::std::experimental::concurrency::v2} into %%\tcode{::std::experimental::concurrency_v1} as if by: %%\begin{codeblock} @@ -89,23 +90,24 @@ %%\end{codeblock} -%%\begin{floattable}{Concurrency\_v2 library headers}{tab:info.headers} -%%{l} -%%\topline -%%\tcode{} \\ -%%\end{floattable} +\begin{floattable}{C++ library headers}{tab:info.headers} +{ll} +\topline +\tcode{} & \tcode{} \\ +\end{floattable} \rSec1[general.feature.test]{Feature-testing recommendations (Informative)} \pnum An implementation that provides support for this document should define each feature test macro defined in \tref{intro.features} if no associated headers are indicated for that macro, and if associated headers are indicated for a macro, that macro is defined after inclusion of one of the corresponding headers specified in the table. \begin{floattable}{Feature-test macros}{tab:intro.features} -{lll} +{lllll} \topline -\lhdr{Macro name} & \chdr{Value} & \rhdr{Header} \\ +\lhdr {Title} & \lhdr {Subclause} & \chdr{Macro name} & \rhdr{Value} & \rhdr{Header} \\ \capsep %%\tcode{__cpp_concurrency\_v2} & \tcode{\tsver} & none \\ -\tcode{__cpp_lib_concurrency\_v2} & \tcode{\tsver} & \tcode{} \\ +\tcode{Hazard pointers} & \tcode{5.2} & \tcode{__cpp_lib_experimental_hazard_pointer} & \tcode{\tsver} & \tcode{} \\ +\tcode{Read-copy update(RCU)} & \tcode{5.3} & \tcode{__cpp_lib_experimental_rcur} & \tcode{\tsver} & \tcode{} \\ \end{floattable} \rSec1[general.plans]{Future plans (Informative)} \pnum diff --git a/src/srHP.tex b/src/srHP.tex index ae593ae..37aedde 100644 --- a/src/srHP.tex +++ b/src/srHP.tex @@ -76,7 +76,7 @@ \end{codeblock} \end{example} -\rSec2[saferecl.hp.syn]{Header \tcode{} synopsis} +\rSec2[saferecl.hp.syn]{Header \tcode{} synopsis} \begin{codeblock} namespace std::experimental::inline concurrency_v2 { diff --git a/src/srrcu.tex b/src/srrcu.tex index 165d58b..1aa131d 100644 --- a/src/srrcu.tex +++ b/src/srrcu.tex @@ -52,7 +52,7 @@ any other such evaluation. Each scheduled evaluation is evaluated at most once. -\rSec2[saferecl.rcu.syn]{Header \tcode{} synopsis} +\rSec2[saferecl.rcu.syn]{Header \tcode{} synopsis} % \indexheader{rcu} \begin{codeblock} From 9617ccc2575378861142cfac31a7bd9f349405c4 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sat, 13 May 2023 02:33:22 -0400 Subject: [PATCH 003/114] Push P1478R8 part 1 changes from Kona --- src/general.tex | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/general.tex b/src/general.tex index 4e6cfe6..dddfe54 100644 --- a/src/general.tex +++ b/src/general.tex @@ -79,7 +79,7 @@ \end{note} \pnum -These are the header described in this document (see Table~\ref{tab:info.headers}) +These are the headers described in this document (see Table~\ref{tab:info.headers}) %%shall import the contents of %%\tcode{::std::experimental::concurrency::v2} into %%\tcode{::std::experimental::concurrency_v1} as if by: @@ -91,9 +91,10 @@ \begin{floattable}{C++ library headers}{tab:info.headers} -{ll} +{lll} \topline -\tcode{} & \tcode{} \\ +\tcode{} & \tcode{} & \tcode{} +\\ \end{floattable} \rSec1[general.feature.test]{Feature-testing recommendations (Informative)} @@ -107,7 +108,8 @@ \capsep %%\tcode{__cpp_concurrency\_v2} & \tcode{\tsver} & none \\ \tcode{Hazard pointers} & \tcode{5.2} & \tcode{__cpp_lib_experimental_hazard_pointer} & \tcode{\tsver} & \tcode{} \\ -\tcode{Read-copy update(RCU)} & \tcode{5.3} & \tcode{__cpp_lib_experimental_rcur} & \tcode{\tsver} & \tcode{} \\ +\tcode{Read-copy update(RCU)} & \tcode{5.3} & \tcode{__cpp_lib_experimental_rcu} & \tcode{\tsver} & \tcode{} \\ +\tcode{Read-copy update(bytewiase atomic memcpy)} & \tcode{6} & \tcode{__cpp_lib_experimental_bytewise_atomic_memcpy} & \tcode{\tsver} & \tcode{} \\ \end{floattable} \rSec1[general.plans]{Future plans (Informative)} \pnum From 42709844fc417003ae2307732f83f97286044b98 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sat, 13 May 2023 06:48:43 -0400 Subject: [PATCH 004/114] Push P1478R8 Part 2 --- src/bytewiseatomic.tex | 107 +++++++++++++++++++++++++++++++++++++++++ src/ts.tex | 1 + 2 files changed, 108 insertions(+) create mode 100644 src/bytewiseatomic.tex diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex new file mode 100644 index 0000000..d97a622 --- /dev/null +++ b/src/bytewiseatomic.tex @@ -0,0 +1,107 @@ +%!TEX root = ts.tex + +\rSec0[bytewiseatomicmemcpy]{Bytewise Atomic Memcpy} + +\rSec1[bytewiseatomicmemcpy.general]{General} + +This clause describes bytewise atomic memcpy access. + + +\rSec1[bytewiseatomicmemcpy.syn]{Header synopsis} +%%\uline{\textbf{Header +%%\texttt{\textless{}experimental/bytewise\_atomic\_memcpy\textgre%%ater{}} +%%synopsis}} + +\begin{codeblock} +namespace std::experimental::inline concurrency_v2 { + + void* atomic_load_per_byte_memcpy(void* dest, const void* source, size_t count, memory_order order); + + void* atomic_store_per_byte_memcpy(void* dest, const void* source, size_t count, memory_order order); + + %% #define __cpp_lib_experimental_bytewise_atomic_memcpy 202XYYL +} +\end{codeblock} + +%%\uline{\texttt{\ namespace\ std::experimental::inline\ %%concurrency\_v2\ \{\ \ ~~void*\ %%atomic\_load\_per\_byte\_memcpy(void*\ dest,\ const\ void*\ %%source,\ size\_t\ count,\ memory\_order\ order);\ \ ~~void*\ %%atomic\_store\_per\_byte\_memcpy(void*\ dest,\ const\ void*\ %%source,\ size\_t\ count,\ memory\_order\ order);\ \ ~~\#define\ %%\_\_cpp\_lib\_experimental\_bytewise\_atomic\_memcpy\ \ %%202XYYL\ \}}} +\rSec1[bytewiseatomicmemcpy.general]{General} +\pnum + +The \texttt{atomic\_load\_per\_byte\_memcpy()} and +\texttt{atomic\_store\_per\_byte\_memcpy()} functions support concurrent +programming idioms in which values may be read while being written, but +the value is trusted only when it can be determined after the fact that +a race did not occur. \begin{note} So-called \"seqlocks\" are the canonical +example of such an idiom. \end{note} + + +\rSec1[bytewiseatomicmemcpy.fn]{Functions} +\pnum +The \texttt{atomic\_load\_per\_byte\_memcpy} / +\texttt{atomic\_store\_per\_byte\_memcpy} functions behave as if the +\texttt{source} and \texttt{dest} bytes respectively were individual +atomic objects. + +\textbf{\texttt{void*\ atomic\_load\_per\_byte\_memcpy(void*\ dest,\ const\ void*\ source,\ size\_t\ count,\ memory\_order\ order);}} + +\begin{itemdescr} +\pnum +\expects + +\texttt{order} is \texttt{memory\_order::acquire} or +\texttt{memory\_order::relaxed}. \texttt{(char*)dest\ +\ {[}0,\ count)} +and \texttt{(const\ char*)source\ +\ {[}0,\ count)} are valid ranges +that do not overlap. + +\pnum +\effects +Copies \texttt{count} consecutive bytes pointed to by +\texttt{source} into consecutive bytes pointed to by \texttt{dest}. Each +individual load operation from a source byte is atomic with memory order +\texttt{order}. These individual loads are unsequenced with respect to +each other. The function implicitly creates objects ({[}intro.object{]}) +in the destination region of storage immediately prior to copying the +sequence of bytes to the destination. +\begin{note} There is no requirement +that the individual bytes be copied in order, or that the implementation +must operate on individual bytes. \end{note} + +\pnum +\returns +\texttt{dest}. +\end{itemdescr} + +\textbf{\texttt{void*\ atomic\_store\_per\_byte\_memcpy(void*\ dest,\ const\ void*\ source,\ size\_t\ count,\ memory\_order\ order);}} + +\begin{itemdescr} +\pnum +\expects +\texttt{order} is \texttt{memory\_order::release} or +\texttt{memory\_order::relaxed}. \texttt{(char*)dest\ +\ {[}0,\ count)} +and \texttt{(const\ char*)source\ +\ {[}0,\ count)} are valid ranges +that do not overlap. + +\pnum +\effects +Copies \texttt{count} consecutive bytes pointed to by +\texttt{source} into consecutive bytes pointed to by \texttt{dest}. Each +individual store operation to a destination byte is atomic with memory +order \texttt{order}. These individual stores are unsequenced with +respect to each other. The function implicitly creates objects +({[}intro.object{]}) in the destination region of storage immediately +prior to copying the sequence of bytes to the destination. + +\pnum +\returns + +\texttt{dest}. +\end{itemdescr} + +\begin{note} If any of the atomic byte loads performed by an +\texttt{atomic\_load\_per\_byte\_memcpy()} call A with +\texttt{memory\_order::acquire} argument take their value from an atomic +byte store performed by \texttt{atomic\_store\_per\_byte\_memcpy()} call +B with \texttt{memory\_order::release} argument, then the start of B +strongly happens before the completion of A. -\/-end note{]} +\end{note} +%%\end{quote} \ No newline at end of file diff --git a/src/ts.tex b/src/ts.tex index 0180829..5bb65e3 100644 --- a/src/ts.tex +++ b/src/ts.tex @@ -119,6 +119,7 @@ \include{srgeneral} \include{srHP} \include{srrcu} +\include{bytewiseatomic} % \include{classes} % \include{overloading} % \include{templates} From a5848a02e0fcd11cdff7e3b0503989a0aa13c05e Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sat, 13 May 2023 08:03:30 -0400 Subject: [PATCH 005/114] Push P0290R4 Part 1 --- src/asymmetric.tex | 112 ++++++++++++++++++++++++++++++++++++ src/bytewiseatomic.tex | 9 +-- src/general.tex | 10 +++- src/syncvalue.tex | 128 +++++++++++++++++++++++++++++++++++++++++ src/ts.tex | 2 + 5 files changed, 254 insertions(+), 7 deletions(-) create mode 100644 src/asymmetric.tex create mode 100644 src/syncvalue.tex diff --git a/src/asymmetric.tex b/src/asymmetric.tex new file mode 100644 index 0000000..9de9d25 --- /dev/null +++ b/src/asymmetric.tex @@ -0,0 +1,112 @@ +%!TEX root = ts.tex + +\rSec0[asymmetric]{Asymmetric Fence} + +\rSec1[asymmetric.general]{General} + +This clause describes Asymmetric Fence access. + + +\rSec1[asymmetric.syn]{Header synopsis} + + +\begin{codeblock} +namespace std::experimental::inline concurrency_v2 { + + +// ?.2.1 asymmetric_thread_fence_heavy +void asymmetric_thread_fence_heavy(memory_order order) noexcept; +// ?.2.2 asymmetric_thread_fence_light +void asymmetric_thread_fence_light(memory_order order) noexcept; + + +} +\end{codeblock} + +%%\uline{\texttt{\ namespace\ std::experimental::inline\ %%concurrency\_v2\ \{\ \ ~~void*\ %%atomic\_load\_per\_byte\_memcpy(void*\ dest,\ const\ void*\ %%source,\ size\_t\ count,\ memory\_order\ order);\ \ ~~void*\ %%atomic\_store\_per\_byte\_memcpy(void*\ dest,\ const\ void*\ %%source,\ size\_t\ count,\ memory\_order\ order);\ \ ~~\#define\ %%\_\_cpp\_lib\_experimental\_bytewise\_atomic\_memcpy\ \ %%202XYYL\ \}}} +%%\rSec1[bytewiseatomicmemcpy.general]{General} +\pnum + +This subclause introduces synchronization primitives called heavyweight-fences and +lightweight-fences. Like fences, heavyweight-fences and lightweight-fences can have acquire +semantics, release semantics, or both, and can be sequentially consistent (in which case they +are included in the total order S on memory\_order::seq\_cst operations). A heavyweight-fence +with acquire semantics is called an acquire heavyweight-fence. A heavyweight-fence has all the +synchronization effects of a fence (33.5.11 [atomics.fences]). \begin{note} Heavyweight-fences and +lightweight-fences are distinct from fences. \end{note} + +\pnum +A heavyweight-fence with acquire semantics is called an acquire heavyweight-fence. A +heavyweight-fence with release semantics is called a release heavyweight-fence. A +lightweight-fence with acquire semantics is called an acquire lightweight-fence. A +lightweight-fence with release semantics is called a release lightweight-fence. + +\pnum +If there are evaluations A and B, and atomic operations X and Y, both operating on some atomic +object M, such that A is sequenced before X, X modifies M, Y is sequenced before B, and Y +reads the value written by X or a value written by any side effect in the hypothetical release +sequence X would head if it were a release operation, and one of the following hold: +\begin{itemize} + \item A is a release lightweight-fence and B is an acquire heavyweight-fence; or +\item A is a release heavyweight-fence and B is an acquire lightweight-fence +\end{itemize} + +then any evaluation sequenced before A strongly happens before any evaluation that B is +sequenced before + + +\rSec1[asymmetric.heavy]{asymmetric_thread_fence_heavy} +\begin{itemdecl} +void asymmetric_thread_fence_heavy(memory_order order) noexcept; +\end{itemdecl} + +\begin{itemdescr} + + +\pnum +\effects +\begin{itemize} + \item has no effects, if order == memory\_order::relaxed; +\item is an acquire heavyweight-fence, if order == memory\_order::acquire or order == +memory\_order::consume; +\item is a release heavyweight-fence, if order == memory\_order::release; +\item is both an acquire heavyweight-fence and a release heavyweight-fence, if order == +memory\_order::acq\_rel; +\item s a sequentially consistent acquire and release heavyweight-fence, if order == +memory\_order::seq\_cst. +\end{itemize} + +\end{itemdescr} + +\rSec1[asymmetric.light]{asymmetric_thread_fence_light} +\begin{itemdecl} +void asymmetric_thread_fence_light(memory_order order) noexcept; +\end{itemdecl} + +\begin{itemdescr} + + +\pnum +\effects +\begin{itemize} + \item has no effects, if order == memory\_order::relaxed; +\item is an acquire lightweight-fence, if order == memory\_order::acquire or order == +memory\_order::consume; +\item is a release lightweight-fence, if order == memory\_order::release; +\item is both an acquire lightweight-fence and a release lightweight-fence, if order == +memory\_order::acq\_rel; +\item s a sequentially consistent acquire and release lightweight-fence, if order == +memory\_order::seq\_cst. +\end{itemize} + +\end{itemdescr} + + + +\begin{note} : Delegating both heavyweight-fence and lightweight-fence functions to an +atomic_thread_fence(order) call is a valid implementation. Implementations can adopt +techniques in which calls to asymmetric_thread_fence_light execute more quickly than calls +to atomic_thread_fence with the same memory_order, at the cost of +asymmetric_thread_fence_heavy executing more slowly than calls to +atomic_thread_fence with the same memory_order +\end{note} diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex index d97a622..79cdbcf 100644 --- a/src/bytewiseatomic.tex +++ b/src/bytewiseatomic.tex @@ -19,12 +19,12 @@ void* atomic_store_per_byte_memcpy(void* dest, const void* source, size_t count, memory_order order); - %% #define __cpp_lib_experimental_bytewise_atomic_memcpy 202XYYL + } \end{codeblock} %%\uline{\texttt{\ namespace\ std::experimental::inline\ %%concurrency\_v2\ \{\ \ ~~void*\ %%atomic\_load\_per\_byte\_memcpy(void*\ dest,\ const\ void*\ %%source,\ size\_t\ count,\ memory\_order\ order);\ \ ~~void*\ %%atomic\_store\_per\_byte\_memcpy(void*\ dest,\ const\ void*\ %%source,\ size\_t\ count,\ memory\_order\ order);\ \ ~~\#define\ %%\_\_cpp\_lib\_experimental\_bytewise\_atomic\_memcpy\ \ %%202XYYL\ \}}} -\rSec1[bytewiseatomicmemcpy.general]{General} +%%\rSec1[bytewiseatomicmemcpy.general]{General} \pnum The \texttt{atomic\_load\_per\_byte\_memcpy()} and @@ -35,7 +35,7 @@ example of such an idiom. \end{note} -\rSec1[bytewiseatomicmemcpy.fn]{Functions} +\rSec1[bytewiseatomicmemcpy.load]{atomic_load_per_byte_memcpy} \pnum The \texttt{atomic\_load\_per\_byte\_memcpy} / \texttt{atomic\_store\_per\_byte\_memcpy} functions behave as if the @@ -71,6 +71,7 @@ \texttt{dest}. \end{itemdescr} +\rSec1[bytewiseatomicmemcpy.store]{atomic_store_per_byte_memcpy} \textbf{\texttt{void*\ atomic\_store\_per\_byte\_memcpy(void*\ dest,\ const\ void*\ source,\ size\_t\ count,\ memory\_order\ order);}} \begin{itemdescr} @@ -102,6 +103,6 @@ \texttt{memory\_order::acquire} argument take their value from an atomic byte store performed by \texttt{atomic\_store\_per\_byte\_memcpy()} call B with \texttt{memory\_order::release} argument, then the start of B -strongly happens before the completion of A. -\/-end note{]} +strongly happens before the completion of A. \end{note} %%\end{quote} \ No newline at end of file diff --git a/src/general.tex b/src/general.tex index dddfe54..f0446dc 100644 --- a/src/general.tex +++ b/src/general.tex @@ -91,9 +91,11 @@ \begin{floattable}{C++ library headers}{tab:info.headers} -{lll} +{lllll} \topline -\tcode{} & \tcode{} & \tcode{} +\tcode{} & \tcode{} & \tcode{} & +\tcode{} & +\tcode{} \\ \end{floattable} @@ -109,7 +111,9 @@ %%\tcode{__cpp_concurrency\_v2} & \tcode{\tsver} & none \\ \tcode{Hazard pointers} & \tcode{5.2} & \tcode{__cpp_lib_experimental_hazard_pointer} & \tcode{\tsver} & \tcode{} \\ \tcode{Read-copy update(RCU)} & \tcode{5.3} & \tcode{__cpp_lib_experimental_rcu} & \tcode{\tsver} & \tcode{} \\ -\tcode{Read-copy update(bytewiase atomic memcpy)} & \tcode{6} & \tcode{__cpp_lib_experimental_bytewise_atomic_memcpy} & \tcode{\tsver} & \tcode{} \\ +\tcode{bytewise atomic memcpy} & \tcode{6} & \tcode{__cpp_lib_experimental_bytewise_atomic_memcpy} & \tcode{\tsver} & \tcode{} \\ +\tcode{Asymmetric Fence} & \tcode{7} & \tcode{__cpp_lib_experimental_asymmetric_fence} & \tcode{\tsver} & \tcode{} \\ +\tcode{Synchronized Value} & \tcode{8} & \tcode{__cpp_lib_experimental_synchronized_value} & \tcode{\tsver} & \tcode{} \\ \end{floattable} \rSec1[general.plans]{Future plans (Informative)} \pnum diff --git a/src/syncvalue.tex b/src/syncvalue.tex new file mode 100644 index 0000000..15eba2f --- /dev/null +++ b/src/syncvalue.tex @@ -0,0 +1,128 @@ +%!TEX root = ts.tex + +\rSec0[synchronizedvalue]{Synchronized Value} + +\rSec1[synchronizedvaluec.general]{General} + +This clause describes Synchronized Value access. + +\subsubsection{x Synchronized Values}\label{x-synchronized-values}} + +This section describes a class template to provide locked access to a +value in order to facilitate the construction of race-free programs. + +\mbox{}% +\hypertarget{header-experimentalsynchronized_value-synopsis}{% +\paragraph{Header +\textless experimental/synchronized\_value\textgreater{} +synopsis}\label{header-experimentalsynchronized_value-synopsis}} + +\begin{verbatim} +namespace std::experimental::inline concurrency_v2 { + template + class synchronized_value; + + template + invoke_result_t apply( + F&& f,synchronized_value&... values); +} +\end{verbatim} + +\mbox{}% +\hypertarget{x.1-class-template-synchronized_value}{% +\paragraph{\texorpdfstring{x.1 Class template +\texttt{synchronized\_value}}{x.1 Class template synchronized\_value}}\label{x.1-class-template-synchronized_value}} + +\begin{verbatim} +namespace std::experimental::inline concurrency_v2 { + template + class synchronized_value + { + public: + synchronized_value(synchronized_value const&) = delete; + synchronized_value& operator=(synchronized_value const&) = delete; + + template + synchronized_value(Args&& ... args); + + private: + T value; // exposition only + mutex mut; // exposition only + }; + +template +synchronized_value(T) +-> synchronized_value; +} +\end{verbatim} + +An object of type \texttt{synchronized\_value\textless{}T\textgreater{}} +wraps an object of type \texttt{T}. The wrapped object can be accessed +by passing a callable object or function to \texttt{apply}. All such +accesses are done with a lock held to ensure that only one thread may be +accessing the wrapped object for a given \texttt{synchronized\_value} at +a time. + +\begin{verbatim} +template +synchronized_value(Args&& ... args); +\end{verbatim} + +\begin{description} +\item[Constraints:] +\begin{itemize} +\tightlist +\item[] +\item + \texttt{(sizeof...(Args)\ !=\ 1)} is \texttt{true} or + \texttt{(!same\_as\textless{}synchronized\_value,remove\_cvref\_t\textless{}Args\textgreater{}\textgreater{}\ \&\&...)} + is \texttt{true} +\item + \texttt{is\_constructible\_v\textless{}T,Args...\textgreater{}} is + \texttt{true} +\end{itemize} +\item[Effects:] +Direct-non-list-initializes \emph{\texttt{value}} with +\texttt{std::forward\textless{}Args\textgreater{}(args)...}. +\item[Throws:] +Any exceptions emitted by the initialization of \emph{\texttt{value}}.\\ +\texttt{system\_error} if any necessary resources cannot be acquired. +\end{description} + +\mbox{}% +\hypertarget{x.2-apply-function}{% +\paragraph{\texorpdfstring{x.2 \texttt{apply} +function}{x.2 apply function}}\label{x.2-apply-function}} + +\begin{verbatim} + template + invoke_result_t apply( + F&& f,synchronized_value&... values); +\end{verbatim} + +\begin{description} +\item[Constraints:] +\texttt{sizeof...(values)\ !=\ 0} is \texttt{true}. +\item[Effects:] +Equivalent to: + +\begin{verbatim} + scoped_lock lock(values.mut...); + return invoke(std::forward(f),values.value...); +\end{verbatim} + +{[}Note: A single instance of \texttt{synchronized\_value} can not be +passed more than once to the same invocation of \texttt{apply}. +{[}Example: + +\begin{verbatim} + synchronized_value sv; + void f(int,int); + apply(f,sv,sv); // undefined behaviour, sv passed more than once to same call +\end{verbatim} + +---End Example{]} ---End Note{]}\\ +{[}Note: The invocation of \texttt{f} can not call \texttt{apply} +directly or indirectly passing any of \texttt{values...}. ---End Note{]} +\end{description} + diff --git a/src/ts.tex b/src/ts.tex index 5bb65e3..aaa5489 100644 --- a/src/ts.tex +++ b/src/ts.tex @@ -120,6 +120,8 @@ \include{srHP} \include{srrcu} \include{bytewiseatomic} +\include{asymmetric} +\include{syncvalue} % \include{classes} % \include{overloading} % \include{templates} From 1ebbd1957957e593655c9a3fab7c7d5218a110a5 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sun, 14 May 2023 01:01:48 -0400 Subject: [PATCH 006/114] Push P0290R4 from Issaquah Part 2 --- src/syncvalue.tex | 116 +++++++++++++++++++++++++++------------------- 1 file changed, 68 insertions(+), 48 deletions(-) diff --git a/src/syncvalue.tex b/src/syncvalue.tex index 15eba2f..cc729e6 100644 --- a/src/syncvalue.tex +++ b/src/syncvalue.tex @@ -2,22 +2,19 @@ \rSec0[synchronizedvalue]{Synchronized Value} -\rSec1[synchronizedvaluec.general]{General} - -This clause describes Synchronized Value access. - -\subsubsection{x Synchronized Values}\label{x-synchronized-values}} +\rSec1[synchronizedvalue.general]{General} This section describes a class template to provide locked access to a value in order to facilitate the construction of race-free programs. -\mbox{}% -\hypertarget{header-experimentalsynchronized_value-synopsis}{% -\paragraph{Header -\textless experimental/synchronized\_value\textgreater{} -synopsis}\label{header-experimentalsynchronized_value-synopsis}} +\rSec1[synchronizedvalue.syn]{Header synopsis} +%%\mbox{}% +%%\hypertarget{header-experimentalsynchronized_value-synopsis}{% +%%\paragraph{Header +%%\textless experimental/synchronized\_value\textgreater{} +%%synopsis}\label{header-experimentalsynchronized_value-%%synopsis}} -\begin{verbatim} +\begin{codeblock} namespace std::experimental::inline concurrency_v2 { template class synchronized_value; @@ -26,14 +23,15 @@ \subsubsection{x Synchronized Values}\label{x-synchronized-values}} invoke_result_t apply( F&& f,synchronized_value&... values); } -\end{verbatim} +\end{codeblock} -\mbox{}% -\hypertarget{x.1-class-template-synchronized_value}{% -\paragraph{\texorpdfstring{x.1 Class template -\texttt{synchronized\_value}}{x.1 Class template synchronized\_value}}\label{x.1-class-template-synchronized_value}} +\rSec1[synchronizedvalue.class]{Class template \tcode{synchronized_value} } +%%\mbox{}% +%%\hypertarget{x.1-class-template-synchronized_value}{% +%%\paragraph{\texorpdfstring{x.1 Class template +%%\texttt{synchronized\_value}}{x.1 Class template %%synchronized\_value}}\label{x.1-class-template-%%synchronized_value}} -\begin{verbatim} +\begin{codeblock} namespace std::experimental::inline concurrency_v2 { template class synchronized_value @@ -54,8 +52,10 @@ \subsubsection{x Synchronized Values}\label{x-synchronized-values}} synchronized_value(T) -> synchronized_value; } -\end{verbatim} +\end{codeblock} +%%\usepackage{enumitem} +\pnum An object of type \texttt{synchronized\_value\textless{}T\textgreater{}} wraps an object of type \texttt{T}. The wrapped object can be accessed by passing a callable object or function to \texttt{apply}. All such @@ -63,17 +63,23 @@ \subsubsection{x Synchronized Values}\label{x-synchronized-values}} accessing the wrapped object for a given \texttt{synchronized\_value} at a time. -\begin{verbatim} +\begin{itemdecl} + template synchronized_value(Args&& ... args); -\end{verbatim} +\end{itemdecl} -\begin{description} -\item[Constraints:] + + +%%\begin{description} +%%\item[Constraints:] +\begin{itemdescr} +%%\tightlist +%%\item[] +\pnum +\constraints \begin{itemize} -\tightlist -\item[] -\item +\item \texttt{(sizeof...(Args)\ !=\ 1)} is \texttt{true} or \texttt{(!same\_as\textless{}synchronized\_value,remove\_cvref\_t\textless{}Args\textgreater{}\textgreater{}\ \&\&...)} is \texttt{true} @@ -81,48 +87,62 @@ \subsubsection{x Synchronized Values}\label{x-synchronized-values}} \texttt{is\_constructible\_v\textless{}T,Args...\textgreater{}} is \texttt{true} \end{itemize} -\item[Effects:] +%%\end{itemdescr} +\pnum +\effects Direct-non-list-initializes \emph{\texttt{value}} with \texttt{std::forward\textless{}Args\textgreater{}(args)...}. -\item[Throws:] + +\pnum +\throws Any exceptions emitted by the initialization of \emph{\texttt{value}}.\\ \texttt{system\_error} if any necessary resources cannot be acquired. -\end{description} +\end{itemdescr} + -\mbox{}% -\hypertarget{x.2-apply-function}{% -\paragraph{\texorpdfstring{x.2 \texttt{apply} -function}{x.2 apply function}}\label{x.2-apply-function}} +\rSec1[synchronizedvalue.fn]{\tcode{apply} function } +%%\mbox{}% +%%\hypertarget{x.2-apply-function}{% +%%\paragraph{\texorpdfstring{x.2 \texttt{apply} +%%function}{x.2 apply function}}\label{x.2-apply-function}} -\begin{verbatim} +\begin{itemdecl} template invoke_result_t apply( F&& f,synchronized_value&... values); -\end{verbatim} +\end{itemdecl} + +\begin{itemdescr} + +%%\end{itemdescr} -\begin{description} -\item[Constraints:] +\pnum +\constraints \texttt{sizeof...(values)\ !=\ 0} is \texttt{true}. -\item[Effects:] + +\pnum +\effects Equivalent to: -\begin{verbatim} +\begin{codeblock} scoped_lock lock(values.mut...); return invoke(std::forward(f),values.value...); -\end{verbatim} +\end{codeblock} -{[}Note: A single instance of \texttt{synchronized\_value} can not be +\begin{note} A single instance of \texttt{synchronized\_value} can not be passed more than once to the same invocation of \texttt{apply}. -{[}Example: +\begin{example} -\begin{verbatim} +\begin{codeblock} synchronized_value sv; void f(int,int); apply(f,sv,sv); // undefined behaviour, sv passed more than once to same call -\end{verbatim} - ----End Example{]} ---End Note{]}\\ -{[}Note: The invocation of \texttt{f} can not call \texttt{apply} -directly or indirectly passing any of \texttt{values...}. ---End Note{]} -\end{description} +\end{codeblock} +\end{example} + \end{note} + +\begin{note} The invocation of \texttt{f} can not call \texttt{apply} +directly or indirectly passing any of \texttt{values...}. +\end{note} +\end{itemdescr} From bfcb1169ce423b21eb47b0d90f05122bad6e2ce5 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sun, 14 May 2023 01:22:35 -0400 Subject: [PATCH 007/114] Updated Table 4.2 --- src/bytewiseatomic.tex | 10 +++++----- src/config.tex | 4 ++-- src/general.tex | 14 +++++++++----- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex index 79cdbcf..77a9349 100644 --- a/src/bytewiseatomic.tex +++ b/src/bytewiseatomic.tex @@ -1,13 +1,13 @@ %!TEX root = ts.tex -\rSec0[bytewiseatomicmemcpy]{Bytewise Atomic Memcpy} +\rSec0[byteatomicmemcpy]{Bytewise Atomic Memcpy} -\rSec1[bytewiseatomicmemcpy.general]{General} +\rSec1[byteatomicmemcpy.general]{General} This clause describes bytewise atomic memcpy access. -\rSec1[bytewiseatomicmemcpy.syn]{Header synopsis} +\rSec1[byteeatomicmemcpy.syn]{Header synopsis} %%\uline{\textbf{Header %%\texttt{\textless{}experimental/bytewise\_atomic\_memcpy\textgre%%ater{}} %%synopsis}} @@ -35,7 +35,7 @@ example of such an idiom. \end{note} -\rSec1[bytewiseatomicmemcpy.load]{atomic_load_per_byte_memcpy} +\rSec1[byteatomicmemcpy.load]{atomic_load_per_byte_memcpy} \pnum The \texttt{atomic\_load\_per\_byte\_memcpy} / \texttt{atomic\_store\_per\_byte\_memcpy} functions behave as if the @@ -71,7 +71,7 @@ \texttt{dest}. \end{itemdescr} -\rSec1[bytewiseatomicmemcpy.store]{atomic_store_per_byte_memcpy} +\rSec1[byteatomicmemcpy.store]{atomic_store_per_byte_memcpy} \textbf{\texttt{void*\ atomic\_store\_per\_byte\_memcpy(void*\ dest,\ const\ void*\ source,\ size\_t\ count,\ memory\_order\ order);}} \begin{itemdescr} diff --git a/src/config.tex b/src/config.tex index 8a41179..8a36c96 100644 --- a/src/config.tex +++ b/src/config.tex @@ -1,9 +1,9 @@ %!TEX root = ts.tex %%-------------------------------------------------- %% Version numbers -\newcommand{\docno}{N4895} +\newcommand{\docno}{N4953} \newcommand{\isodocno}{ISO/IEC ?????:2021(E)} -\newcommand{\prevdocno}{None} +\newcommand{\prevdocno}{N4895} \newcommand{\cppver}{201703L @@@} %% MW: need update \newcommand{\tsver}{202108} diff --git a/src/general.tex b/src/general.tex index f0446dc..9da3b15 100644 --- a/src/general.tex +++ b/src/general.tex @@ -91,12 +91,12 @@ \begin{floattable}{C++ library headers}{tab:info.headers} -{lllll} +{l} \topline -\tcode{} & \tcode{} & \tcode{} & -\tcode{} & -\tcode{} -\\ +\tcode{} \\ +\tcode{} \\ \tcode{} \\ +\tcode{} \\ +\tcode{} \\ \end{floattable} \rSec1[general.feature.test]{Feature-testing recommendations (Informative)} @@ -107,6 +107,10 @@ {lllll} \topline \lhdr {Title} & \lhdr {Subclause} & \chdr{Macro name} & \rhdr{Value} & \rhdr{Header} \\ +%%{ll} +%%\lhdr {Title} & +%%\rhdr {Subclause \\ Macro name \\ Value \\ Header} \\ + \capsep %%\tcode{__cpp_concurrency\_v2} & \tcode{\tsver} & none \\ \tcode{Hazard pointers} & \tcode{5.2} & \tcode{__cpp_lib_experimental_hazard_pointer} & \tcode{\tsver} & \tcode{} \\ From fc7f9f539060afaa26900a6f42bf4af2ced4fc37 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sun, 14 May 2023 02:27:29 -0400 Subject: [PATCH 008/114] Added clause 33.5.4 for asymmetric fence --- src/asymmetric.tex | 6 ++++-- src/order.tex | 42 ++++++++++++++++++++++++++++++++++++++++++ src/syncvalue.tex | 2 +- src/ts.tex | 1 + 4 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 src/order.tex diff --git a/src/asymmetric.tex b/src/asymmetric.tex index 9de9d25..a03f8ab 100644 --- a/src/asymmetric.tex +++ b/src/asymmetric.tex @@ -14,9 +14,9 @@ namespace std::experimental::inline concurrency_v2 { -// ?.2.1 asymmetric_thread_fence_heavy +// 7.3 asymmetric_thread_fence_heavy void asymmetric_thread_fence_heavy(memory_order order) noexcept; -// ?.2.2 asymmetric_thread_fence_light +// 7.4 asymmetric_thread_fence_light void asymmetric_thread_fence_light(memory_order order) noexcept; @@ -110,3 +110,5 @@ asymmetric_thread_fence_heavy executing more slowly than calls to atomic_thread_fence with the same memory_order \end{note} + + diff --git a/src/order.tex b/src/order.tex new file mode 100644 index 0000000..8a3f250 --- /dev/null +++ b/src/order.tex @@ -0,0 +1,42 @@ +%!TEX root = ts.tex + + +\setcounter{chapter}{32} +\rSec0[thread]{Concurrency support library} +\setcounter{section}{4} +\rSec1[atomics]{Atomic operations} +\setcounter{subsection}{3} +\rSec2[atomics.order]{Order and consistency} + +Change in \CppXref{atomics.order} paragraph 4 as indicated: +\begin{quote} +\setcounter{Paras}{3} +\pnum +There is a single total order $S$ +on all \tcode{memory_order::seq_cst} operations, including fences, +that satisfies the following constraints. +First, if $A$ and $B$ are +\tcode{memory_order::seq_cst} operations and +$A$ strongly happens before $B$, +then $A$ precedes $B$ in $S$. +Second, for every pair of atomic operations $A$ and +$B$ on an object $M$, +where $A$ is coherence-ordered before $B$, +the following \removed{four} conditions are required to be satisfied by $S$: + +\end{quote} + +Add the following two bullets to the list: +\begin{quote} +%%\setcounter{Paras}{3} +\pnum +\begin{itemize} +\item + ... +\item +if a \tcode{memory_order::seq_cst} lightweight-fence $X$ happens before $A$ and $B$ happens +before a \tcode{memory_order::seq_cst} heavyweight-fence $Y$, then $X$ precedes $Y$ in $S$; and +\item if a \tcode{memory_order::seq_cst} heavyweight-fence $X$ happens before $A$ and $B$ happens +before a \tcode{memory_order::seq_cst} lightweight-fence $Y$, then $X$ precedes $Y$ in $S$. +\end{itemize} +\end{quote} \ No newline at end of file diff --git a/src/syncvalue.tex b/src/syncvalue.tex index cc729e6..f7b826e 100644 --- a/src/syncvalue.tex +++ b/src/syncvalue.tex @@ -1,5 +1,5 @@ %!TEX root = ts.tex - +\setcounter{chapter}{7} \rSec0[synchronizedvalue]{Synchronized Value} \rSec1[synchronizedvalue.general]{General} diff --git a/src/ts.tex b/src/ts.tex index aaa5489..e081c8a 100644 --- a/src/ts.tex +++ b/src/ts.tex @@ -122,6 +122,7 @@ \include{bytewiseatomic} \include{asymmetric} \include{syncvalue} +\include{order} % \include{classes} % \include{overloading} % \include{templates} From 5e8f46bf5b4f9a65c099f1edaac5919d56103e02 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sun, 14 May 2023 02:41:34 -0400 Subject: [PATCH 009/114] small fixes --- src/bytewiseatomic.tex | 2 +- src/order.tex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex index 77a9349..60e8120 100644 --- a/src/bytewiseatomic.tex +++ b/src/bytewiseatomic.tex @@ -31,7 +31,7 @@ \texttt{atomic\_store\_per\_byte\_memcpy()} functions support concurrent programming idioms in which values may be read while being written, but the value is trusted only when it can be determined after the fact that -a race did not occur. \begin{note} So-called \"seqlocks\" are the canonical +a race did not occur. \begin{note} So-called "seqlocks" are the canonical example of such an idiom. \end{note} diff --git a/src/order.tex b/src/order.tex index 8a3f250..a557698 100644 --- a/src/order.tex +++ b/src/order.tex @@ -8,7 +8,7 @@ \setcounter{subsection}{3} \rSec2[atomics.order]{Order and consistency} -Change in \CppXref{atomics.order} paragraph 4 as indicated: +Change in \CppXref{33.5.4} paragraph 4 as indicated: \begin{quote} \setcounter{Paras}{3} \pnum From eb1cd8ec843b44e1890c3fd4bd1d9fcb6f5cea1a Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sun, 14 May 2023 06:12:30 -0400 Subject: [PATCH 010/114] Last bit of fixes. --- src/asymmetric.tex | 62 ++++++++++++++++++++++++---------------------- src/general.tex | 55 ++++++++++++++++++++++++++++++++-------- src/syncvalue.tex | 8 +++--- 3 files changed, 81 insertions(+), 44 deletions(-) diff --git a/src/asymmetric.tex b/src/asymmetric.tex index a03f8ab..574c2eb 100644 --- a/src/asymmetric.tex +++ b/src/asymmetric.tex @@ -27,19 +27,19 @@ %%\rSec1[bytewiseatomicmemcpy.general]{General} \pnum -This subclause introduces synchronization primitives called heavyweight-fences and -lightweight-fences. Like fences, heavyweight-fences and lightweight-fences can have acquire +This subclause introduces synchronization primitives called \defn{heavyweight-fences} and +\defn{lightweight-fences}. Like fences, heavyweight-fences and lightweight-fences can have acquire semantics, release semantics, or both, and can be sequentially consistent (in which case they -are included in the total order S on memory\_order::seq\_cst operations). A heavyweight-fence +are included in the total order \tcode{S} on \tcode{memory_order::seq_cst} operations). A heavyweight-fence with acquire semantics is called an acquire heavyweight-fence. A heavyweight-fence has all the -synchronization effects of a fence (33.5.11 [atomics.fences]). \begin{note} Heavyweight-fences and +synchronization effects of a fence (\CppXref{33.5.11} [atomics.fences]). \begin{note} Heavyweight-fences and lightweight-fences are distinct from fences. \end{note} \pnum -A heavyweight-fence with acquire semantics is called an acquire heavyweight-fence. A -heavyweight-fence with release semantics is called a release heavyweight-fence. A -lightweight-fence with acquire semantics is called an acquire lightweight-fence. A -lightweight-fence with release semantics is called a release lightweight-fence. +A heavyweight-fence with acquire semantics is called an \defn{acquire heavyweight-fence}. A +heavyweight-fence with release semantics is called a \defn{release heavyweight-fence}. A +lightweight-fence with acquire semantics is called an \defn{acquire lightweight-fence}. A +lightweight-fence with release semantics is called a \defn{release lightweight-fence}. \pnum If there are evaluations A and B, and atomic operations X and Y, both operating on some atomic @@ -52,7 +52,7 @@ \end{itemize} then any evaluation sequenced before A strongly happens before any evaluation that B is -sequenced before +sequenced before. \rSec1[asymmetric.heavy]{asymmetric_thread_fence_heavy} @@ -65,15 +65,16 @@ \pnum \effects +Depending on the value of \tcode{order}, this operation: \begin{itemize} - \item has no effects, if order == memory\_order::relaxed; -\item is an acquire heavyweight-fence, if order == memory\_order::acquire or order == -memory\_order::consume; -\item is a release heavyweight-fence, if order == memory\_order::release; -\item is both an acquire heavyweight-fence and a release heavyweight-fence, if order == -memory\_order::acq\_rel; -\item s a sequentially consistent acquire and release heavyweight-fence, if order == -memory\_order::seq\_cst. + \item has no effects, if \tcode{order == memory\_order::relaxed}; +\item is an acquire heavyweight-fence, if \tcode{order == memory\_order::acquire} or \tcode{order == +memory\_order::consume}; +\item is a release heavyweight-fence, if \tcode{order == memory\_order::release}; +\item is both an acquire heavyweight-fence and a release heavyweight-fence, if \tcode{order == +memory_order::acq_rel}; +\item is a sequentially consistent acquire and release heavyweight-fence, if \tcode{order == +memory_order::seq_cst}. \end{itemize} \end{itemdescr} @@ -88,15 +89,16 @@ \pnum \effects +Depending on the value of \tcode{order}, this operation: \begin{itemize} - \item has no effects, if order == memory\_order::relaxed; -\item is an acquire lightweight-fence, if order == memory\_order::acquire or order == -memory\_order::consume; -\item is a release lightweight-fence, if order == memory\_order::release; -\item is both an acquire lightweight-fence and a release lightweight-fence, if order == -memory\_order::acq\_rel; -\item s a sequentially consistent acquire and release lightweight-fence, if order == -memory\_order::seq\_cst. + \item has no effects, if \tcode{order == memory\_order::relaxed}; +\item is an acquire lightweight-fence, if \tcode{order == memory\_order::acquire} or \tcode{order == +memory\_order::consume}; +\item is a release lightweight-fence, if \tcode{order == memory\_order::release}; +\item is both an acquire lightweight-fence and a release lightweight-fence, if \tcode{order == +memory\_order::acq\_rel}; +\item is a sequentially consistent acquire and release lightweight-fence, if \tcode{order == +memory\_order::seq\_cst}. \end{itemize} \end{itemdescr} @@ -104,11 +106,11 @@ \begin{note} : Delegating both heavyweight-fence and lightweight-fence functions to an -atomic_thread_fence(order) call is a valid implementation. Implementations can adopt -techniques in which calls to asymmetric_thread_fence_light execute more quickly than calls -to atomic_thread_fence with the same memory_order, at the cost of -asymmetric_thread_fence_heavy executing more slowly than calls to -atomic_thread_fence with the same memory_order +\tcode{atomic_thread_fence(order)} call is a valid implementation. Implementations can adopt +techniques in which calls to \tcode{asymmetric_thread_fence_light} execute more quickly than calls +to \tcode{atomic_thread_fence} with the same \tcode{memory_order}, at the cost of +\tcode{asymmetric_thread_fence_heavy} executing more slowly than calls to +\tcode{atomic_thread_fence} with the same \tcode{memory_order} \end{note} diff --git a/src/general.tex b/src/general.tex index 9da3b15..b6398b3 100644 --- a/src/general.tex +++ b/src/general.tex @@ -101,24 +101,59 @@ \rSec1[general.feature.test]{Feature-testing recommendations (Informative)} \pnum -An implementation that provides support for this document should define each feature test macro defined in \tref{intro.features} if no associated headers are indicated for that macro, and if associated headers are indicated for a macro, that macro is defined after inclusion of one of the corresponding headers specified in the table. +An implementation that provides support for this document should define each feature test macro defined in \tref{intro.features1} if no associated headers are indicated for that macro, and if associated headers are indicated for a macro, that macro is defined after inclusion of one of the corresponding headers specified in the table. -\begin{floattable}{Feature-test macros}{tab:intro.features} -{lllll} +%%\begin{floattable}{Feature-test macros name}{tab:intro.features} +%%{lllll} +%%\topline +%%\lhdr {Title} & \lhdr {Subclause} & \chdr{Macro name} & %%\rhdr{Value} & \rhdr{Header} \\ +%%{ll} +%%\lhdr {Title} & +%%\rhdr {Subclause \\ Macro name \\ Value \\ Header} \\ + +%%\capsep +%%\tcode{__cpp_concurrency\_v2} & \tcode{\tsver} & none \\ +%%\tcode{Hazard pointers} & \tcode{5.2} & %%\tcode{__cpp_lib_experimental_hazard_pointer} & \tcode{\tsver} %%& \tcode{} \\ +%%\tcode{Read-copy update(RCU)} & \tcode{5.3} & %%\tcode{__cpp_lib_experimental_rcu} & \tcode{\tsver} & %%\tcode{} \\ +%%\tcode{bytewise atomic memcpy} & \tcode{6} & %%\tcode{__cpp_lib_experimental_bytewise_atomic_memcpy} & %%\tcode{\tsver} & \tcode{} \\ +%%\tcode{Asymmetric Fence} & \tcode{7} & %%\tcode{__cpp_lib_experimental_asymmetric_fence} & \tcode{\tsver} %% & \tcode{} \\ +%%\tcode{Synchronized Value} & \tcode{8} & %%\tcode{__cpp_lib_experimental_synchronized_value} & %%\tcode{\tsver} & \tcode{} \\ +%%\end{floattable} + +\begin{floattable}{Feature-test macros name}{tab:intro.features1} +{lll} \topline -\lhdr {Title} & \lhdr {Subclause} & \chdr{Macro name} & \rhdr{Value} & \rhdr{Header} \\ +\lhdr {Title} & \chdr {Subclause} & \rhdr{Macro name} \\ %%{ll} %%\lhdr {Title} & %%\rhdr {Subclause \\ Macro name \\ Value \\ Header} \\ \capsep %%\tcode{__cpp_concurrency\_v2} & \tcode{\tsver} & none \\ -\tcode{Hazard pointers} & \tcode{5.2} & \tcode{__cpp_lib_experimental_hazard_pointer} & \tcode{\tsver} & \tcode{} \\ -\tcode{Read-copy update(RCU)} & \tcode{5.3} & \tcode{__cpp_lib_experimental_rcu} & \tcode{\tsver} & \tcode{} \\ -\tcode{bytewise atomic memcpy} & \tcode{6} & \tcode{__cpp_lib_experimental_bytewise_atomic_memcpy} & \tcode{\tsver} & \tcode{} \\ -\tcode{Asymmetric Fence} & \tcode{7} & \tcode{__cpp_lib_experimental_asymmetric_fence} & \tcode{\tsver} & \tcode{} \\ -\tcode{Synchronized Value} & \tcode{8} & \tcode{__cpp_lib_experimental_synchronized_value} & \tcode{\tsver} & \tcode{} \\ +\tcode{Hazard pointers} & \tcode{5.2} & \tcode{__cpp_lib_experimental_hazard_pointer} \\ +\tcode{Read-copy update(RCU)} & \tcode{5.3} & \tcode{__cpp_lib_experimental_rcu} \\ +\tcode{bytewise atomic memcpy} & \tcode{6} & \tcode{__cpp_lib_experimental_bytewise_atomic_memcpy} \\ +\tcode{Asymmetric Fence} & \tcode{7} & \tcode{__cpp_lib_experimental_asymmetric_fence} \\ +\tcode{Synchronized Value} & \tcode{8} & \tcode{__cpp_lib_experimental_synchronized_value} \\ \end{floattable} + +\begin{floattable}{Feature-test macros header}{tab:intro.features2} +{lll} +\topline +\lhdr {Title} & \chdr{Value} & \rhdr{Header} \\ +%%{ll} +%%\lhdr {Title} & +%%\rhdr {Subclause \\ Macro name \\ Value \\ Header} \\ + +\capsep +%%\tcode{__cpp_concurrency\_v2} & \tcode{\tsver} & none \\ +\tcode{Hazard pointers} & \tcode{\tsver} & \tcode{} \\ +\tcode{Read-copy update(RCU)} & \tcode{\tsver} & \tcode{} \\ +\tcode{bytewise atomic memcpy} & \tcode{\tsver} & \tcode{} \\ +\tcode{Asymmetric Fence} & \tcode{\tsver} & \tcode{} \\ +\tcode{Synchronized Value} & \tcode{\tsver} & \tcode{} \\ +\end{floattable} + \rSec1[general.plans]{Future plans (Informative)} \pnum This section describes tentative plans for future versions of this technical specification and plans for moving content into @@ -138,7 +173,7 @@ \rSec1[general.ack]{Acknowledgments} This work is the result of a collaboration of researchers in industry and academia. We wish to thank the -original authors of this document, Michael Wong, Paul McKenney, and Maged Michael. We also wish to thank people +original authors of this document, Michael Wong, Paul McKenney, and Maged Michael, and the editing review team of Jonathan Wakely, Daniel Krügler, and Bryan St. Amour. We also wish to thank people who made valuable contributions within and outside these groups, including Jens Maurer, and many others not named here who contributed to the discussion. diff --git a/src/syncvalue.tex b/src/syncvalue.tex index f7b826e..fe3e78f 100644 --- a/src/syncvalue.tex +++ b/src/syncvalue.tex @@ -56,11 +56,11 @@ %%\usepackage{enumitem} \pnum -An object of type \texttt{synchronized\_value\textless{}T\textgreater{}} -wraps an object of type \texttt{T}. The wrapped object can be accessed -by passing a callable object or function to \texttt{apply}. All such +An object of type \tcode{synchronized_value} +wraps an object of type \tcode{T}. The wrapped object can be accessed +by passing a callable object or function to \tcode{apply}. All such accesses are done with a lock held to ensure that only one thread may be -accessing the wrapped object for a given \texttt{synchronized\_value} at +accessing the wrapped object for a given \tcode{synchronized_value} at a time. \begin{itemdecl} From b0f86b70c75c6315694ec77313a1f7127c156f9a Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sun, 14 May 2023 06:51:15 -0400 Subject: [PATCH 011/114] more fixes --- src/general.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/general.tex b/src/general.tex index b6398b3..89bee0c 100644 --- a/src/general.tex +++ b/src/general.tex @@ -101,7 +101,7 @@ \rSec1[general.feature.test]{Feature-testing recommendations (Informative)} \pnum -An implementation that provides support for this document should define each feature test macro defined in \tref{intro.features1} if no associated headers are indicated for that macro, and if associated headers are indicated for a macro, that macro is defined after inclusion of one of the corresponding headers specified in the table. +An implementation that provides support for this document should define each feature test macro defined in \tref{intro.features1} and \tref{intro.features2} if no associated headers are indicated for that macro, and if associated headers are indicated for a macro, that macro is defined after inclusion of one of the corresponding headers specified in the table. %%\begin{floattable}{Feature-test macros name}{tab:intro.features} %%{lllll} From 7782837570bc60598d86f295921646cbb5f45d1c Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sun, 14 May 2023 06:56:23 -0400 Subject: [PATCH 012/114] updated Readme.md editor's report --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index b7aeb51..707b1b3 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,23 @@ sources, or you can use the `latexmk` program e.g. `latexmk -pdf ts` will generate a PDF. \textbf{Concurrency TS2 Editor's Report} +\textbf{pre-June 2023 Varna Plenary meeting} +N4953 is the proposed working draft of Concurrency TS Version 2. It contains changes to the Concurrency TS as directed by the committee at the Nov 2022 Kona and Feb 2023 Issaquah plenary meeting, and editorial changes. + +FROM KONA: +Concurrency Technical Specification polls +4. Apply the changes in P2396R1 (Concurrency TS fixes) to the Working Paper for Extensions for C++ for Concurrency, version 2. + +5. Apply the changes in P1478R8 (Byte-wise atomic memcpy) to the Working Paper for Extensions for C++ for Concurrency, version 2. + +6. Apply the changes in P1202R5 (Asymmetric Fences) to the Working Paper for Extensions for C++ for Concurrency, version 2. + +FROM ISSAQUAH: +Concurrency TS v2 polls +1. Apply the changes in P0290R4 (synchronized value) to the Concurrency TS v2 working paper. + + + \textbf{pre-Oct 2021 virtual Plenary meeting} N4895 is the proposed working draft of Concurrency TS Version 2. It contains changes to the Concurrency TS as directed by the committee at the June 2021 virtual plenary meeting, and editorial changes. From e6054eddaa94434959b217be01b4bff33760b9cf Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Sun, 14 May 2023 06:26:55 -0700 Subject: [PATCH 013/114] bytewiseatomic: Remove extraneous blank lines Signed-off-by: Paul E. McKenney --- src/bytewiseatomic.tex | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex index 60e8120..cbc1667 100644 --- a/src/bytewiseatomic.tex +++ b/src/bytewiseatomic.tex @@ -14,12 +14,8 @@ \begin{codeblock} namespace std::experimental::inline concurrency_v2 { - void* atomic_load_per_byte_memcpy(void* dest, const void* source, size_t count, memory_order order); - void* atomic_store_per_byte_memcpy(void* dest, const void* source, size_t count, memory_order order); - - } \end{codeblock} @@ -105,4 +101,4 @@ B with \texttt{memory\_order::release} argument, then the start of B strongly happens before the completion of A. \end{note} -%%\end{quote} \ No newline at end of file +%%\end{quote} From 1119972c3c3844b4de567f3fd0a0a68bf7a2bc14 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Sun, 14 May 2023 06:30:28 -0700 Subject: [PATCH 014/114] asymmetric: Remove extraneous blank lines Signed-off-by: Paul E. McKenney --- src/asymmetric.tex | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/asymmetric.tex b/src/asymmetric.tex index 574c2eb..3a1dec5 100644 --- a/src/asymmetric.tex +++ b/src/asymmetric.tex @@ -13,13 +13,11 @@ \begin{codeblock} namespace std::experimental::inline concurrency_v2 { - // 7.3 asymmetric_thread_fence_heavy void asymmetric_thread_fence_heavy(memory_order order) noexcept; + // 7.4 asymmetric_thread_fence_light void asymmetric_thread_fence_light(memory_order order) noexcept; - - } \end{codeblock} From 47c1ac5d98eb679b3c9f4196a1c42ebad76a30a4 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 26 May 2023 10:17:39 -0700 Subject: [PATCH 015/114] bytewiseatomic: Convert texttt to tcode Signed-off-by: Paul E. McKenney --- src/bytewiseatomic.tex | 50 +++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex index cbc1667..bd6423a 100644 --- a/src/bytewiseatomic.tex +++ b/src/bytewiseatomic.tex @@ -23,8 +23,8 @@ %%\rSec1[bytewiseatomicmemcpy.general]{General} \pnum -The \texttt{atomic\_load\_per\_byte\_memcpy()} and -\texttt{atomic\_store\_per\_byte\_memcpy()} functions support concurrent +The \tcode{atomic_load_per_byte_memcpy()} and +\tcode{atomic_store_per_byte_memcpy()} functions support concurrent programming idioms in which values may be read while being written, but the value is trusted only when it can be determined after the fact that a race did not occur. \begin{note} So-called "seqlocks" are the canonical @@ -33,28 +33,28 @@ \rSec1[byteatomicmemcpy.load]{atomic_load_per_byte_memcpy} \pnum -The \texttt{atomic\_load\_per\_byte\_memcpy} / -\texttt{atomic\_store\_per\_byte\_memcpy} functions behave as if the -\texttt{source} and \texttt{dest} bytes respectively were individual +The \tcode{atomic_load_per_byte_memcpy} / +\tcode{atomic_store_per_byte_memcpy} functions behave as if the +\tcode{source} and \tcode{dest} bytes respectively were individual atomic objects. -\textbf{\texttt{void*\ atomic\_load\_per\_byte\_memcpy(void*\ dest,\ const\ void*\ source,\ size\_t\ count,\ memory\_order\ order);}} +\textbf{\tcode{void*\ atomic_load_per_byte_memcpy(void* dest, const void* source, size_t count, memory_order order);}} \begin{itemdescr} \pnum \expects -\texttt{order} is \texttt{memory\_order::acquire} or -\texttt{memory\_order::relaxed}. \texttt{(char*)dest\ +\ {[}0,\ count)} -and \texttt{(const\ char*)source\ +\ {[}0,\ count)} are valid ranges +\tcode{order} is \tcode{memory_order::acquire} or +\tcode{memory_order::relaxed}. \tcode{(char*)dest + [0, count)} +and \tcode{(const char*)source + [0, count)} are valid ranges that do not overlap. \pnum \effects -Copies \texttt{count} consecutive bytes pointed to by -\texttt{source} into consecutive bytes pointed to by \texttt{dest}. Each +Copies \tcode{count} consecutive bytes pointed to by +\tcode{source} into consecutive bytes pointed to by \tcode{dest}. Each individual load operation from a source byte is atomic with memory order -\texttt{order}. These individual loads are unsequenced with respect to +\tcode{order}. These individual loads are unsequenced with respect to each other. The function implicitly creates objects ({[}intro.object{]}) in the destination region of storage immediately prior to copying the sequence of bytes to the destination. @@ -64,26 +64,26 @@ \pnum \returns -\texttt{dest}. +\tcode{dest}. \end{itemdescr} \rSec1[byteatomicmemcpy.store]{atomic_store_per_byte_memcpy} -\textbf{\texttt{void*\ atomic\_store\_per\_byte\_memcpy(void*\ dest,\ const\ void*\ source,\ size\_t\ count,\ memory\_order\ order);}} +\textbf{\tcode{void* atomic_store_per_byte_memcpy(void* dest, const void* source, size_t count, memory_order order);}} \begin{itemdescr} \pnum \expects -\texttt{order} is \texttt{memory\_order::release} or -\texttt{memory\_order::relaxed}. \texttt{(char*)dest\ +\ {[}0,\ count)} -and \texttt{(const\ char*)source\ +\ {[}0,\ count)} are valid ranges +\tcode{order} is \tcode{memory_order::release} or +\tcode{memory_order::relaxed}. \tcode{(char*)dest + [0, count)} +and \tcode{(const char*)source + [0, count)} are valid ranges that do not overlap. \pnum \effects -Copies \texttt{count} consecutive bytes pointed to by -\texttt{source} into consecutive bytes pointed to by \texttt{dest}. Each +Copies \tcode{count} consecutive bytes pointed to by +\tcode{source} into consecutive bytes pointed to by \tcode{dest}. Each individual store operation to a destination byte is atomic with memory -order \texttt{order}. These individual stores are unsequenced with +order \tcode{order}. These individual stores are unsequenced with respect to each other. The function implicitly creates objects ({[}intro.object{]}) in the destination region of storage immediately prior to copying the sequence of bytes to the destination. @@ -91,14 +91,14 @@ \pnum \returns -\texttt{dest}. +\tcode{dest}. \end{itemdescr} \begin{note} If any of the atomic byte loads performed by an -\texttt{atomic\_load\_per\_byte\_memcpy()} call A with -\texttt{memory\_order::acquire} argument take their value from an atomic -byte store performed by \texttt{atomic\_store\_per\_byte\_memcpy()} call -B with \texttt{memory\_order::release} argument, then the start of B +\tcode{atomic_load_per_byte_memcpy()} call A with +\tcode{memory_order::acquire} argument take their value from an atomic +byte store performed by \tcode{atomic_store_per_byte_memcpy()} call +B with \tcode{memory_order::release} argument, then the start of B strongly happens before the completion of A. \end{note} %%\end{quote} From 46aa5eca24ff6849fc7f99befdcd2878c7797844 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 26 May 2023 10:23:55 -0700 Subject: [PATCH 016/114] syncvalue: Convert texttt to tcode Signed-off-by: Paul E. McKenney --- src/syncvalue.tex | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/syncvalue.tex b/src/syncvalue.tex index fe3e78f..a8287c7 100644 --- a/src/syncvalue.tex +++ b/src/syncvalue.tex @@ -80,30 +80,30 @@ \constraints \begin{itemize} \item - \texttt{(sizeof...(Args)\ !=\ 1)} is \texttt{true} or - \texttt{(!same\_as\textless{}synchronized\_value,remove\_cvref\_t\textless{}Args\textgreater{}\textgreater{}\ \&\&...)} - is \texttt{true} + \tcode{(sizeof...(Args) != 1)} is \tcode{true} or + \tcode{(!same_as>\ \&\&...)} + is \tcode{true} \item - \texttt{is\_constructible\_v\textless{}T,Args...\textgreater{}} is - \texttt{true} + \tcode{is_constructible_v} is + \tcode{true} \end{itemize} %%\end{itemdescr} \pnum \effects -Direct-non-list-initializes \emph{\texttt{value}} with -\texttt{std::forward\textless{}Args\textgreater{}(args)...}. +Direct-non-list-initializes \emph{\tcode{value}} with +\tcode{std::forward(args)...}. \pnum \throws -Any exceptions emitted by the initialization of \emph{\texttt{value}}.\\ -\texttt{system\_error} if any necessary resources cannot be acquired. +Any exceptions emitted by the initialization of \emph{\tcode{value}}.\\ +\tcode{system_error} if any necessary resources cannot be acquired. \end{itemdescr} \rSec1[synchronizedvalue.fn]{\tcode{apply} function } %%\mbox{}% %%\hypertarget{x.2-apply-function}{% -%%\paragraph{\texorpdfstring{x.2 \texttt{apply} +%%\paragraph{\texorpdfstring{x.2 \tcode{apply} %%function}{x.2 apply function}}\label{x.2-apply-function}} \begin{itemdecl} @@ -118,7 +118,7 @@ \pnum \constraints -\texttt{sizeof...(values)\ !=\ 0} is \texttt{true}. +\tcode{sizeof...(values) != 0} is \tcode{true}. \pnum \effects @@ -129,8 +129,8 @@ return invoke(std::forward(f),values.value...); \end{codeblock} -\begin{note} A single instance of \texttt{synchronized\_value} can not be -passed more than once to the same invocation of \texttt{apply}. +\begin{note} A single instance of \tcode{synchronized_value} can not be +passed more than once to the same invocation of \tcode{apply}. \begin{example} \begin{codeblock} @@ -141,8 +141,8 @@ \end{example} \end{note} -\begin{note} The invocation of \texttt{f} can not call \texttt{apply} -directly or indirectly passing any of \texttt{values...}. +\begin{note} The invocation of \tcode{f} can not call \tcode{apply} +directly or indirectly passing any of \tcode{values...}. \end{note} \end{itemdescr} From ba1b40d458aff54dd47de6d86848a88e71d9d731 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 30 May 2023 14:32:26 -0700 Subject: [PATCH 017/114] syncvalue: Remove extraneous space after "class" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-by: Daniel Krügler Signed-off-by: Paul E. McKenney --- src/syncvalue.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/syncvalue.tex b/src/syncvalue.tex index a8287c7..6ee3c36 100644 --- a/src/syncvalue.tex +++ b/src/syncvalue.tex @@ -19,7 +19,7 @@ template class synchronized_value; - template + template invoke_result_t apply( F&& f,synchronized_value&... values); } @@ -40,7 +40,7 @@ synchronized_value(synchronized_value const&) = delete; synchronized_value& operator=(synchronized_value const&) = delete; - template + template synchronized_value(Args&& ... args); private: @@ -65,7 +65,7 @@ \begin{itemdecl} -template +template synchronized_value(Args&& ... args); \end{itemdecl} @@ -107,7 +107,7 @@ %%function}{x.2 apply function}}\label{x.2-apply-function}} \begin{itemdecl} - template + template invoke_result_t apply( F&& f,synchronized_value&... values); \end{itemdecl} From 0b538871cf89d204de6fa40555fca75c05556ef7 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 30 May 2023 14:34:38 -0700 Subject: [PATCH 018/114] syncvalue: s/synchronized_value const/const synchronized_value/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-by: Daniel Krügler Signed-off-by: Paul E. McKenney --- src/syncvalue.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/syncvalue.tex b/src/syncvalue.tex index 6ee3c36..4033ac0 100644 --- a/src/syncvalue.tex +++ b/src/syncvalue.tex @@ -37,8 +37,8 @@ class synchronized_value { public: - synchronized_value(synchronized_value const&) = delete; - synchronized_value& operator=(synchronized_value const&) = delete; + synchronized_value(const synchronized_value&) = delete; + synchronized_value& operator=(const synchronized_value&) = delete; template synchronized_value(Args&& ... args); From 36d9b43b322ed44773b5b03a6ada42ec92ab7978 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 30 May 2023 14:46:10 -0700 Subject: [PATCH 019/114] syncvalue: Put exposition-only members in italics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-by: Daniel Krügler Signed-off-by: Paul E. McKenney --- src/syncvalue.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/syncvalue.tex b/src/syncvalue.tex index 4033ac0..6a7b704 100644 --- a/src/syncvalue.tex +++ b/src/syncvalue.tex @@ -44,8 +44,8 @@ synchronized_value(Args&& ... args); private: - T value; // exposition only - mutex mut; // exposition only + @\emph{T value;}@ // exposition only + @\emph{mutex mut;}@ // exposition only }; template @@ -125,8 +125,8 @@ Equivalent to: \begin{codeblock} - scoped_lock lock(values.mut...); - return invoke(std::forward(f),values.value...); + scoped_lock lock(values.@\emph{mut}@...); + return invoke(std::forward(f),values.@\emph{value}@...); \end{codeblock} \begin{note} A single instance of \tcode{synchronized_value} can not be From 50341a6fd2ab943e6103dc92907bcf869ea526d3 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 30 May 2023 14:51:34 -0700 Subject: [PATCH 020/114] config: Update from 202108 to 202302 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-by: Daniel Krügler Signed-off-by: Paul E. McKenney --- src/config.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.tex b/src/config.tex index 8a36c96..f4bca86 100644 --- a/src/config.tex +++ b/src/config.tex @@ -5,7 +5,7 @@ \newcommand{\isodocno}{ISO/IEC ?????:2021(E)} \newcommand{\prevdocno}{N4895} \newcommand{\cppver}{201703L @@@} %% MW: need update -\newcommand{\tsver}{202108} +\newcommand{\tsver}{202302} %% Title \newcommand{\doctitle}{Extensions to \Cpp for Concurrency Version 2 @@@} From e6c5f487fb9d4f1cf67c22518f65fdff6a18e0fa Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 30 May 2023 14:58:34 -0700 Subject: [PATCH 021/114] ts: Upgrade from C++20 to C++23 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-by: Daniel Krügler Signed-off-by: Paul E. McKenney --- src/ts.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ts.tex b/src/ts.tex index e081c8a..b354828 100644 --- a/src/ts.tex +++ b/src/ts.tex @@ -60,7 +60,7 @@ \newcommand{\completionsig}{\Fundesc{Completion signature}} \newcommand{\DEDUCED}{\textit{\texttt{DEDUCED}}} \newcommand{\nativeref}{see~\ref{socket.reqmts.native}} -\newcommand{\CppXref}[1]{\texorpdfstring{C\kern-0.05em\protect\raisebox{.35ex}{\textsmaller[2]{+\kern-0.05em+}}20}{C++20} \S#1} +\newcommand{\CppXref}[1]{\texorpdfstring{C\kern-0.05em\protect\raisebox{.35ex}{\textsmaller[2]{+\kern-0.05em+}}23}{C++23} \S#1} % Alternative formatting of cross-references, resolving stable name to number. % Needs include{cxx} and CppXIV from cplusplus/draft/source/macros.tex. % \input{cxx} From 6d0058b0bcbda28bda7f4eccf8ffcc50c144dfe9 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 2 Jun 2023 09:17:31 -0700 Subject: [PATCH 022/114] Update feature-test macro value/date For this, we chose June 2023 as in 202306. Signed-off-by: Paul E. McKenney --- src/config.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.tex b/src/config.tex index f4bca86..6e3405d 100644 --- a/src/config.tex +++ b/src/config.tex @@ -5,7 +5,7 @@ \newcommand{\isodocno}{ISO/IEC ?????:2021(E)} \newcommand{\prevdocno}{N4895} \newcommand{\cppver}{201703L @@@} %% MW: need update -\newcommand{\tsver}{202302} +\newcommand{\tsver}{202306} %% Title \newcommand{\doctitle}{Extensions to \Cpp for Concurrency Version 2 @@@} From b9033c37649c76b60e6a5d312d11e07a2d539c13 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 2 Jun 2023 09:30:33 -0700 Subject: [PATCH 023/114] Revert "ts: Upgrade from C++20 to C++23" This reverts commit e6c5f487fb9d4f1cf67c22518f65fdff6a18e0fa. The style needs to be that of C++23, but there is not yet a C++23, so revert back to C++20. --- src/ts.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ts.tex b/src/ts.tex index b354828..e081c8a 100644 --- a/src/ts.tex +++ b/src/ts.tex @@ -60,7 +60,7 @@ \newcommand{\completionsig}{\Fundesc{Completion signature}} \newcommand{\DEDUCED}{\textit{\texttt{DEDUCED}}} \newcommand{\nativeref}{see~\ref{socket.reqmts.native}} -\newcommand{\CppXref}[1]{\texorpdfstring{C\kern-0.05em\protect\raisebox{.35ex}{\textsmaller[2]{+\kern-0.05em+}}23}{C++23} \S#1} +\newcommand{\CppXref}[1]{\texorpdfstring{C\kern-0.05em\protect\raisebox{.35ex}{\textsmaller[2]{+\kern-0.05em+}}20}{C++20} \S#1} % Alternative formatting of cross-references, resolving stable name to number. % Needs include{cxx} and CppXIV from cplusplus/draft/source/macros.tex. % \input{cxx} From 7bcfb2d8d0293d6419b25c27ccc0c1af3077a87c Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 2 Jun 2023 09:32:29 -0700 Subject: [PATCH 024/114] asymmetric: Use C++20 section numbers C++23 not yet being in existence... Signed-off-by: Paul E. McKenney --- src/asymmetric.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asymmetric.tex b/src/asymmetric.tex index 3a1dec5..522023c 100644 --- a/src/asymmetric.tex +++ b/src/asymmetric.tex @@ -30,7 +30,7 @@ semantics, release semantics, or both, and can be sequentially consistent (in which case they are included in the total order \tcode{S} on \tcode{memory_order::seq_cst} operations). A heavyweight-fence with acquire semantics is called an acquire heavyweight-fence. A heavyweight-fence has all the -synchronization effects of a fence (\CppXref{33.5.11} [atomics.fences]). \begin{note} Heavyweight-fences and +synchronization effects of a fence (\CppXref{31.11} [atomics.fences]). \begin{note} Heavyweight-fences and lightweight-fences are distinct from fences. \end{note} \pnum From 9b6524a35228d4e635e5ed0950e32c0b9fb3556e Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 2 Jun 2023 12:00:24 -0700 Subject: [PATCH 025/114] asymmetric: Remove redundant "acquire" definition Reported-by: David Goldblatt Signed-off-by: Paul E. McKenney --- src/asymmetric.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/asymmetric.tex b/src/asymmetric.tex index 522023c..f58e831 100644 --- a/src/asymmetric.tex +++ b/src/asymmetric.tex @@ -28,8 +28,8 @@ This subclause introduces synchronization primitives called \defn{heavyweight-fences} and \defn{lightweight-fences}. Like fences, heavyweight-fences and lightweight-fences can have acquire semantics, release semantics, or both, and can be sequentially consistent (in which case they -are included in the total order \tcode{S} on \tcode{memory_order::seq_cst} operations). A heavyweight-fence -with acquire semantics is called an acquire heavyweight-fence. A heavyweight-fence has all the +are included in the total order \tcode{S} on \tcode{memory_order::seq_cst} operations). +A heavyweight-fence has all the synchronization effects of a fence (\CppXref{31.11} [atomics.fences]). \begin{note} Heavyweight-fences and lightweight-fences are distinct from fences. \end{note} From a92253809251e419fc35d40556baa2095ed8b58c Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 2 Jun 2023 12:01:20 -0700 Subject: [PATCH 026/114] asymmetric: Remove extraneous colon (":") Signed-off-by: Paul E. McKenney --- src/asymmetric.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asymmetric.tex b/src/asymmetric.tex index f58e831..72363d0 100644 --- a/src/asymmetric.tex +++ b/src/asymmetric.tex @@ -103,7 +103,7 @@ -\begin{note} : Delegating both heavyweight-fence and lightweight-fence functions to an +\begin{note} Delegating both heavyweight-fence and lightweight-fence functions to an \tcode{atomic_thread_fence(order)} call is a valid implementation. Implementations can adopt techniques in which calls to \tcode{asymmetric_thread_fence_light} execute more quickly than calls to \tcode{atomic_thread_fence} with the same \tcode{memory_order}, at the cost of From 909ab66b31b548942b6186b18924e9e4194bfe46 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Sun, 4 Jun 2023 16:31:20 -0700 Subject: [PATCH 027/114] =?UTF-8?q?treewide:=20Fixes=20from=20Daniel=20Kr?= =?UTF-8?q?=C3=BCgler=20May=201=20review?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-by: Daniel Krügler Signed-off-by: Paul E. McKenney --- src/asymmetric.tex | 20 ++++++++++---------- src/bytewiseatomic.tex | 2 +- src/syncvalue.tex | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/asymmetric.tex b/src/asymmetric.tex index 72363d0..2b7712d 100644 --- a/src/asymmetric.tex +++ b/src/asymmetric.tex @@ -65,14 +65,14 @@ \effects Depending on the value of \tcode{order}, this operation: \begin{itemize} - \item has no effects, if \tcode{order == memory\_order::relaxed}; + \item has no effects, if \tcode{order == memory\_order::relaxed} is \tcode{true}; \item is an acquire heavyweight-fence, if \tcode{order == memory\_order::acquire} or \tcode{order == -memory\_order::consume}; -\item is a release heavyweight-fence, if \tcode{order == memory\_order::release}; +memory\_order::consume} is \tcode{true}; +\item is a release heavyweight-fence, if \tcode{order == memory\_order::release} is \tcode{true}; \item is both an acquire heavyweight-fence and a release heavyweight-fence, if \tcode{order == -memory_order::acq_rel}; +memory_order::acq_rel} is \tcode{true}; \item is a sequentially consistent acquire and release heavyweight-fence, if \tcode{order == -memory_order::seq_cst}. +memory_order::seq_cst} is \tcode{true}. \end{itemize} \end{itemdescr} @@ -89,14 +89,14 @@ \effects Depending on the value of \tcode{order}, this operation: \begin{itemize} - \item has no effects, if \tcode{order == memory\_order::relaxed}; + \item has no effects, if \tcode{order == memory\_order::relaxed} is \tcode{true}; \item is an acquire lightweight-fence, if \tcode{order == memory\_order::acquire} or \tcode{order == -memory\_order::consume}; -\item is a release lightweight-fence, if \tcode{order == memory\_order::release}; +memory\_order::consume} is \tcode{true}; +\item is a release lightweight-fence, if \tcode{order == memory\_order::release} is \tcode{true}; \item is both an acquire lightweight-fence and a release lightweight-fence, if \tcode{order == -memory\_order::acq\_rel}; +memory\_order::acq\_rel} is \tcode{true}; \item is a sequentially consistent acquire and release lightweight-fence, if \tcode{order == -memory\_order::seq\_cst}. +memory\_order::seq\_cst} is \tcode{true}. \end{itemize} \end{itemdescr} diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex index bd6423a..e18a8de 100644 --- a/src/bytewiseatomic.tex +++ b/src/bytewiseatomic.tex @@ -7,7 +7,7 @@ This clause describes bytewise atomic memcpy access. -\rSec1[byteeatomicmemcpy.syn]{Header synopsis} +\rSec1[byteeatomicmemcpy.syn]{Header synopsis} %%\uline{\textbf{Header %%\texttt{\textless{}experimental/bytewise\_atomic\_memcpy\textgre%%ater{}} %%synopsis}} diff --git a/src/syncvalue.tex b/src/syncvalue.tex index 6a7b704..00e3eb3 100644 --- a/src/syncvalue.tex +++ b/src/syncvalue.tex @@ -41,11 +41,11 @@ synchronized_value& operator=(const synchronized_value&) = delete; template - synchronized_value(Args&& ... args); + synchronized_value(Args&&... args); private: - @\emph{T value;}@ // exposition only - @\emph{mutex mut;}@ // exposition only + T @\emph{value;}@ // exposition only + mutex @\emph{mut;}@ // exposition only }; template @@ -66,7 +66,7 @@ \begin{itemdecl} template -synchronized_value(Args&& ... args); +synchronized_value(Args&&... args); \end{itemdecl} From 603a05f5f1ad6541f02afd5e6d5ea8d9c5e1a34d Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 7 Jun 2023 16:59:57 -0700 Subject: [PATCH 028/114] treewide: Convert immutable references to C++20 section numbers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-by: Daniel Krügler Signed-off-by: Paul E. McKenney --- src/asymmetric.tex | 2 +- src/bytewiseatomic.tex | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/asymmetric.tex b/src/asymmetric.tex index 2b7712d..8bbb1ae 100644 --- a/src/asymmetric.tex +++ b/src/asymmetric.tex @@ -30,7 +30,7 @@ semantics, release semantics, or both, and can be sequentially consistent (in which case they are included in the total order \tcode{S} on \tcode{memory_order::seq_cst} operations). A heavyweight-fence has all the -synchronization effects of a fence (\CppXref{31.11} [atomics.fences]). \begin{note} Heavyweight-fences and +synchronization effects of a fence (\CppXref{31.11}). \begin{note} Heavyweight-fences and lightweight-fences are distinct from fences. \end{note} \pnum diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex index e18a8de..504427f 100644 --- a/src/bytewiseatomic.tex +++ b/src/bytewiseatomic.tex @@ -55,7 +55,7 @@ \tcode{source} into consecutive bytes pointed to by \tcode{dest}. Each individual load operation from a source byte is atomic with memory order \tcode{order}. These individual loads are unsequenced with respect to -each other. The function implicitly creates objects ({[}intro.object{]}) +each other. The function implicitly creates objects (\CppXref{6.7.2}) in the destination region of storage immediately prior to copying the sequence of bytes to the destination. \begin{note} There is no requirement @@ -85,7 +85,7 @@ individual store operation to a destination byte is atomic with memory order \tcode{order}. These individual stores are unsequenced with respect to each other. The function implicitly creates objects -({[}intro.object{]}) in the destination region of storage immediately +(\CppXref{6.7.2}) in the destination region of storage immediately prior to copying the sequence of bytes to the destination. \pnum From dc6d70d4c101f12453df998a5abb75ac421ef7cd Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 9 Jun 2023 09:30:42 -0700 Subject: [PATCH 029/114] bytewiseatomic: s/bytewiseatomicmemcpy/atomiccpy/ Suggested-by: Hans Boehm Signed-off-by: Paul E. McKenney --- src/bytewiseatomic.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex index 504427f..46d79fc 100644 --- a/src/bytewiseatomic.tex +++ b/src/bytewiseatomic.tex @@ -1,13 +1,13 @@ %!TEX root = ts.tex -\rSec0[byteatomicmemcpy]{Bytewise Atomic Memcpy} +\rSec0[atomiccpy]{Bytewise Atomic Memcpy} -\rSec1[byteatomicmemcpy.general]{General} +\rSec1[atomiccpy.general]{General} This clause describes bytewise atomic memcpy access. -\rSec1[byteeatomicmemcpy.syn]{Header synopsis} +\rSec1[atomiccpy.syn]{Header synopsis} %%\uline{\textbf{Header %%\texttt{\textless{}experimental/bytewise\_atomic\_memcpy\textgre%%ater{}} %%synopsis}} @@ -31,7 +31,7 @@ example of such an idiom. \end{note} -\rSec1[byteatomicmemcpy.load]{atomic_load_per_byte_memcpy} +\rSec1[atomiccpy.load]{atomic_load_per_byte_memcpy} \pnum The \tcode{atomic_load_per_byte_memcpy} / \tcode{atomic_store_per_byte_memcpy} functions behave as if the @@ -67,7 +67,7 @@ \tcode{dest}. \end{itemdescr} -\rSec1[byteatomicmemcpy.store]{atomic_store_per_byte_memcpy} +\rSec1[atomiccpy.store]{atomic_store_per_byte_memcpy} \textbf{\tcode{void* atomic_store_per_byte_memcpy(void* dest, const void* source, size_t count, memory_order order);}} \begin{itemdescr} From 09bcd18e517454277eb24afce88b90de23e29708 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 9 Jun 2023 09:33:28 -0700 Subject: [PATCH 030/114] bytewiseatomic: Function name in code font in headers Reported-by: Hans Boehm Signed-off-by: Paul E. McKenney --- src/bytewiseatomic.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex index 46d79fc..5ca997e 100644 --- a/src/bytewiseatomic.tex +++ b/src/bytewiseatomic.tex @@ -31,7 +31,7 @@ example of such an idiom. \end{note} -\rSec1[atomiccpy.load]{atomic_load_per_byte_memcpy} +\rSec1[atomiccpy.load]{\tcode{atomic_load_per_byte_memcpy}} \pnum The \tcode{atomic_load_per_byte_memcpy} / \tcode{atomic_store_per_byte_memcpy} functions behave as if the @@ -67,7 +67,7 @@ \tcode{dest}. \end{itemdescr} -\rSec1[atomiccpy.store]{atomic_store_per_byte_memcpy} +\rSec1[atomiccpy.store]{\tcode{atomic_store_per_byte_memcpy}} \textbf{\tcode{void* atomic_store_per_byte_memcpy(void* dest, const void* source, size_t count, memory_order order);}} \begin{itemdescr} From b8a403f9fe38d7ee216cbc75ad753785f2964e76 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 9 Jun 2023 09:35:56 -0700 Subject: [PATCH 031/114] bytewiseatomic: Use code font for header-file names Reported-by: Hans Boehm Signed-off-by: Paul E. McKenney --- src/bytewiseatomic.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex index 5ca997e..c7146ff 100644 --- a/src/bytewiseatomic.tex +++ b/src/bytewiseatomic.tex @@ -7,7 +7,7 @@ This clause describes bytewise atomic memcpy access. -\rSec1[atomiccpy.syn]{Header synopsis} +\rSec1[atomiccpy.syn]{Header \tcode{} synopsis} %%\uline{\textbf{Header %%\texttt{\textless{}experimental/bytewise\_atomic\_memcpy\textgre%%ater{}} %%synopsis}} From 067c8726100e636bfb5ec37d28a6645f235d59ee Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 9 Jun 2023 12:06:33 -0700 Subject: [PATCH 032/114] ts.tex: Put synchronized value first Suggested-by: Hans Boehm Signed-off-by: Paul E. McKenney --- src/ts.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ts.tex b/src/ts.tex index e081c8a..9ab6075 100644 --- a/src/ts.tex +++ b/src/ts.tex @@ -116,12 +116,12 @@ \include{general} %%\include{modifications} +\include{syncvalue} \include{srgeneral} \include{srHP} \include{srrcu} \include{bytewiseatomic} \include{asymmetric} -\include{syncvalue} \include{order} % \include{classes} % \include{overloading} From 67929f695a76c034a58286b6e96de6b16bbcf819 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 9 Jun 2023 13:40:23 -0700 Subject: [PATCH 033/114] syncvalue: Comment out chapter-8 hard coding Reported-by: Hans Boehm Signed-off-by: Paul E. McKenney --- src/syncvalue.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/syncvalue.tex b/src/syncvalue.tex index 00e3eb3..1f2585d 100644 --- a/src/syncvalue.tex +++ b/src/syncvalue.tex @@ -1,5 +1,5 @@ %!TEX root = ts.tex -\setcounter{chapter}{7} +% \setcounter{chapter}{7} \rSec0[synchronizedvalue]{Synchronized Value} \rSec1[synchronizedvalue.general]{General} From 6ae28a1122aedc4d88762bc98f6dcc10af0fdcf8 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sat, 10 Jun 2023 08:34:46 -0400 Subject: [PATCH 034/114] Fix tables 1,2,3 due to reordering. --- src/general.tex | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/general.tex b/src/general.tex index 89bee0c..2337fb6 100644 --- a/src/general.tex +++ b/src/general.tex @@ -93,10 +93,11 @@ \begin{floattable}{C++ library headers}{tab:info.headers} {l} \topline +\tcode{} \\ \tcode{} \\ \tcode{} \\ \tcode{} \\ \tcode{} \\ -\tcode{} \\ + \end{floattable} \rSec1[general.feature.test]{Feature-testing recommendations (Informative)} @@ -130,11 +131,12 @@ \capsep %%\tcode{__cpp_concurrency\_v2} & \tcode{\tsver} & none \\ -\tcode{Hazard pointers} & \tcode{5.2} & \tcode{__cpp_lib_experimental_hazard_pointer} \\ -\tcode{Read-copy update(RCU)} & \tcode{5.3} & \tcode{__cpp_lib_experimental_rcu} \\ -\tcode{bytewise atomic memcpy} & \tcode{6} & \tcode{__cpp_lib_experimental_bytewise_atomic_memcpy} \\ -\tcode{Asymmetric Fence} & \tcode{7} & \tcode{__cpp_lib_experimental_asymmetric_fence} \\ -\tcode{Synchronized Value} & \tcode{8} & \tcode{__cpp_lib_experimental_synchronized_value} \\ +\tcode{Synchronized Value} & \tcode{5} & \tcode{__cpp_lib_experimental_synchronized_value} \\ +\tcode{Hazard pointers} & \tcode{6.2} & \tcode{__cpp_lib_experimental_hazard_pointer} \\ +\tcode{Read-copy update(RCU)} & \tcode{6.3} & \tcode{__cpp_lib_experimental_rcu} \\ +\tcode{bytewise atomic memcpy} & \tcode{7} & \tcode{__cpp_lib_experimental_bytewise_atomic_memcpy} \\ +\tcode{Asymmetric Fence} & \tcode{8,33} & \tcode{__cpp_lib_experimental_asymmetric_fence} \\ + \end{floattable} \begin{floattable}{Feature-test macros header}{tab:intro.features2} @@ -147,11 +149,12 @@ \capsep %%\tcode{__cpp_concurrency\_v2} & \tcode{\tsver} & none \\ +\tcode{Synchronized Value} & \tcode{\tsver} & \tcode{} \\ \tcode{Hazard pointers} & \tcode{\tsver} & \tcode{} \\ \tcode{Read-copy update(RCU)} & \tcode{\tsver} & \tcode{} \\ \tcode{bytewise atomic memcpy} & \tcode{\tsver} & \tcode{} \\ \tcode{Asymmetric Fence} & \tcode{\tsver} & \tcode{} \\ -\tcode{Synchronized Value} & \tcode{\tsver} & \tcode{} \\ + \end{floattable} \rSec1[general.plans]{Future plans (Informative)} From de8298bd9019d96ac47f34a2fd052ab3b99dc6b3 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sat, 10 Jun 2023 08:38:30 -0400 Subject: [PATCH 035/114] Table 1 alpabetical order. --- src/general.tex | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/general.tex b/src/general.tex index 2337fb6..e049562 100644 --- a/src/general.tex +++ b/src/general.tex @@ -93,10 +93,11 @@ \begin{floattable}{C++ library headers}{tab:info.headers} {l} \topline -\tcode{} \\ -\tcode{} \\ -\tcode{} \\ \tcode{} \\ \tcode{} \\ +\tcode{} \\ +\tcode{} \\ +\tcode{} \\ +\tcode{} \\ \end{floattable} From cb5f603e4e5a0a7d21aeb8b81ea976592ed7bd12 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Wed, 14 Jun 2023 05:06:53 -0400 Subject: [PATCH 036/114] Capitalize Bytewise --- src/general.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/general.tex b/src/general.tex index e049562..9994942 100644 --- a/src/general.tex +++ b/src/general.tex @@ -135,7 +135,7 @@ \tcode{Synchronized Value} & \tcode{5} & \tcode{__cpp_lib_experimental_synchronized_value} \\ \tcode{Hazard pointers} & \tcode{6.2} & \tcode{__cpp_lib_experimental_hazard_pointer} \\ \tcode{Read-copy update(RCU)} & \tcode{6.3} & \tcode{__cpp_lib_experimental_rcu} \\ -\tcode{bytewise atomic memcpy} & \tcode{7} & \tcode{__cpp_lib_experimental_bytewise_atomic_memcpy} \\ +\tcode{Bytewise atomic memcpy} & \tcode{7} & \tcode{__cpp_lib_experimental_bytewise_atomic_memcpy} \\ \tcode{Asymmetric Fence} & \tcode{8,33} & \tcode{__cpp_lib_experimental_asymmetric_fence} \\ \end{floattable} @@ -153,7 +153,7 @@ \tcode{Synchronized Value} & \tcode{\tsver} & \tcode{} \\ \tcode{Hazard pointers} & \tcode{\tsver} & \tcode{} \\ \tcode{Read-copy update(RCU)} & \tcode{\tsver} & \tcode{} \\ -\tcode{bytewise atomic memcpy} & \tcode{\tsver} & \tcode{} \\ +\tcode{Bytewise atomic memcpy} & \tcode{\tsver} & \tcode{} \\ \tcode{Asymmetric Fence} & \tcode{\tsver} & \tcode{} \\ \end{floattable} From d30537a471e8219bd4e4f5f37ec7d4fd70a97b67 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Wed, 14 Jun 2023 05:08:41 -0400 Subject: [PATCH 037/114] UPdate title to PDTS, Extensions to C++for Concurrency --- src/cover-wd.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cover-wd.tex b/src/cover-wd.tex index d5294c4..e595bd6 100644 --- a/src/cover-wd.tex +++ b/src/cover-wd.tex @@ -22,7 +22,7 @@ \vspace{2.5cm} \begin{center} \textbf{\Huge -Working Draft, Extensions to \Cpp for Concurrency Version 2} +PDTS, Extensions to \Cpp for Concurrency} \end{center} \vfill \textbf{Note: this is an early draft. It's known to be incomplet and From 2d9f000f47bb50cba3953b01cccef9859b3d3181 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Wed, 14 Jun 2023 10:01:28 -0400 Subject: [PATCH 038/114] update to N4956 and removed crazy claim --- src/config.tex | 4 ++-- src/cover-wd.tex | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/config.tex b/src/config.tex index 6e3405d..e1c53e6 100644 --- a/src/config.tex +++ b/src/config.tex @@ -1,9 +1,9 @@ %!TEX root = ts.tex %%-------------------------------------------------- %% Version numbers -\newcommand{\docno}{N4953} +\newcommand{\docno}{N4956} \newcommand{\isodocno}{ISO/IEC ?????:2021(E)} -\newcommand{\prevdocno}{N4895} +\newcommand{\prevdocno}{N4953} \newcommand{\cppver}{201703L @@@} %% MW: need update \newcommand{\tsver}{202306} diff --git a/src/cover-wd.tex b/src/cover-wd.tex index e595bd6..4ebbca3 100644 --- a/src/cover-wd.tex +++ b/src/cover-wd.tex @@ -25,7 +25,7 @@ PDTS, Extensions to \Cpp for Concurrency} \end{center} \vfill -\textbf{Note: this is an early draft. It's known to be incomplet and - incorrekt, and it has lots of - b\kern-1.2pta\kern1ptd\hspace{1.5em}for\kern-3ptmat\kern0.6ptti\raise0.15ex\hbox{n}g.} +%%\textbf{Note: this is an early draft. It's known to be incomplet and +%% incorrekt, and it has lots of +%% b\kern-1.2pta\kern1ptd\hspace{1.5em}for\kern-%%3ptmat\kern0.6ptti\raise0.15ex\hbox{n}g.} \newpage From d3bdc545ff35a0455d39005087dba6d08e39e4ce Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Wed, 5 Jul 2023 12:04:37 -0400 Subject: [PATCH 039/114] =?UTF-8?q?Changed=20title=20to=20Programming=20La?= =?UTF-8?q?nguages=20=E2=80=94=20Technical=20specification=20for=20C++=20e?= =?UTF-8?q?xtensions=20for=20concurrency=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.tex | 6 +++--- src/cover-wd.tex | 4 +++- src/ts.tex | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/config.tex b/src/config.tex index e1c53e6..8fd4ad3 100644 --- a/src/config.tex +++ b/src/config.tex @@ -2,7 +2,7 @@ %%-------------------------------------------------- %% Version numbers \newcommand{\docno}{N4956} -\newcommand{\isodocno}{ISO/IEC ?????:2021(E)} +\newcommand{\isodocno}{ISO/IEC DTS 9922:2023(E)} \newcommand{\prevdocno}{N4953} \newcommand{\cppver}{201703L @@@} %% MW: need update \newcommand{\tsver}{202306} @@ -17,8 +17,8 @@ %% Release date \newcommand{\reldate}{\today} -\newcommand{\copyrightyear}{2021} -\newcommand{\cppstddocno}{ISO/IEC 14882:2020} +\newcommand{\copyrightyear}{2023} +\newcommand{\cppstddocno}{ISO/IEC DTS 9922:2023(E)} %% Library chapters diff --git a/src/cover-wd.tex b/src/cover-wd.tex index 4ebbca3..12f6009 100644 --- a/src/cover-wd.tex +++ b/src/cover-wd.tex @@ -22,7 +22,9 @@ \vspace{2.5cm} \begin{center} \textbf{\Huge -PDTS, Extensions to \Cpp for Concurrency} +Programming Languages — Technical specification for \Cpp extensions for concurrency 2 +%%PDTS, Extensions to \Cpp for Concurrency +} \end{center} \vfill %%\textbf{Note: this is an early draft. It's known to be incomplet and diff --git a/src/ts.tex b/src/ts.tex index 9ab6075..b0d0b9c 100644 --- a/src/ts.tex +++ b/src/ts.tex @@ -29,7 +29,7 @@ \usepackage[T1]{fontenc} \usepackage[pdftex, final]{graphicx} \usepackage[pdftex, - pdftitle={C++ Concurrency Technical Specification 2}, + pdftitle={Programming Languages — Technical specification for /Cpp extensions for concurrency 2}, pdfsubject={C++ Concurrency Technical Specification 2}, pdfcreator={Michael Wong, Maged Michael, and Paul E.~McKenney}, bookmarks=true, From dcb04c9ff42ddddba86dd02a57d117b9e70c3900 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Wed, 5 Jul 2023 12:15:58 -0400 Subject: [PATCH 040/114] =?UTF-8?q?1.=20Title=20needs=20to=20match=20the?= =?UTF-8?q?=20ISO=20Project=20portal,=20Programming=20Languages=20?= =?UTF-8?q?=E2=80=94=20Technical=20specification=20for=20C++=20extensions?= =?UTF-8?q?=20for=20concurrency=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2. The header needs to be ISO/IEC DTS 9922:2023(E). 3. Footer should say © ISO/IEC 2023 – All rights reserved --- src/styles.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/styles.tex b/src/styles.tex index a5dd6c9..3811a9d 100644 --- a/src/styles.tex +++ b/src/styles.tex @@ -21,10 +21,10 @@ %% create page styles \makepagestyle{cpppage} -\makeevenhead{cpppage}{\copyright\,\textsc{ISO/IEC}}{}{\textbf{\docno}} -\makeoddhead{cpppage}{\copyright\,\textsc{ISO/IEC}}{}{\textbf{\docno}} -\makeevenfoot{cpppage}{\leftmark}{}{\thepage} -\makeoddfoot{cpppage}{\leftmark}{}{\thepage} +\makeevenhead{cpppage}{\copyright\,\textsc{ISO/IEC DTS 9922:2023(E)}}{}{\textbf{\docno}} +\makeoddhead{cpppage}{\copyright\,\textsc{ISO/IEC DTS 9922:2023(E)}}{}{\textbf{\docno}} +\makeevenfoot{cpppage}{\leftmark}{© ISO/IEC 2023 – All rights reserved}{\thepage} +\makeoddfoot{cpppage}{\leftmark}{© ISO/IEC 2023 – All rights reserved}{\thepage} \makeatletter \makepsmarks{cpppage}{% From 81e75ff321d791b8ce132f1546ae52c876b75021 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Wed, 5 Jul 2023 12:18:23 -0400 Subject: [PATCH 041/114] Remove copyright sign in header --- src/styles.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/styles.tex b/src/styles.tex index 3811a9d..9095839 100644 --- a/src/styles.tex +++ b/src/styles.tex @@ -21,8 +21,8 @@ %% create page styles \makepagestyle{cpppage} -\makeevenhead{cpppage}{\copyright\,\textsc{ISO/IEC DTS 9922:2023(E)}}{}{\textbf{\docno}} -\makeoddhead{cpppage}{\copyright\,\textsc{ISO/IEC DTS 9922:2023(E)}}{}{\textbf{\docno}} +\makeevenhead{cpppage}{\textsc{ISO/IEC DTS 9922:2023(E)}}{}{\textbf{\docno}} +\makeoddhead{cpppage}{\textsc{ISO/IEC DTS 9922:2023(E)}}{}{\textbf{\docno}} \makeevenfoot{cpppage}{\leftmark}{© ISO/IEC 2023 – All rights reserved}{\thepage} \makeoddfoot{cpppage}{\leftmark}{© ISO/IEC 2023 – All rights reserved}{\thepage} From 9486964018b8ef42e952309e9a34b364fdc9bd74 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Wed, 16 Aug 2023 23:15:50 -0400 Subject: [PATCH 042/114] Update Readme.md for Editors report P2960 --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 707b1b3..c0f786f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - is the repository for + is the repository for the C++ Technical Specification "Concurrency TS 2". The draft Technical Specification is found in the `src` directory and is @@ -7,7 +7,19 @@ sources, or you can use the `latexmk` program e.g. `latexmk -pdf ts` will generate a PDF. \textbf{Concurrency TS2 Editor's Report} -\textbf{pre-June 2023 Varna Plenary meeting} +\textbf{August 2023 post-Varna Plenary meeting} +N4956 is the proposed PDTS of COncurrency TS Version 2. +It contains changes to the N4953 as directed by the committee review and author review. This version has been sent to Geneva. + +Some of those changes are +1. Convert texttt to tcode +2. Use C++20 section numbers +3. Update feature-test macro value/date +4. Use code fonts for header names +5. Capitalize bytewise + + +\textbf{June 2023 pre-Varna Plenary meeting} N4953 is the proposed working draft of Concurrency TS Version 2. It contains changes to the Concurrency TS as directed by the committee at the Nov 2022 Kona and Feb 2023 Issaquah plenary meeting, and editorial changes. FROM KONA: From 8e81f4e6a112078daa6bdf0ef144bc45cca59d78 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 20 Oct 2023 09:16:39 -0700 Subject: [PATCH 043/114] order.tex: Reword to text change instructions No highlighting! Reported-by: Michael Wong Signed-off-by: Paul E. McKenney --- src/order.tex | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/src/order.tex b/src/order.tex index a557698..d0dcfe0 100644 --- a/src/order.tex +++ b/src/order.tex @@ -8,23 +8,9 @@ \setcounter{subsection}{3} \rSec2[atomics.order]{Order and consistency} -Change in \CppXref{33.5.4} paragraph 4 as indicated: -\begin{quote} -\setcounter{Paras}{3} -\pnum -There is a single total order $S$ -on all \tcode{memory_order::seq_cst} operations, including fences, -that satisfies the following constraints. -First, if $A$ and $B$ are -\tcode{memory_order::seq_cst} operations and -$A$ strongly happens before $B$, -then $A$ precedes $B$ in $S$. -Second, for every pair of atomic operations $A$ and -$B$ on an object $M$, -where $A$ is coherence-ordered before $B$, -the following \removed{four} conditions are required to be satisfied by $S$: - -\end{quote} +Change in \CppXref{33.5.4} paragraph 4 to remove the word ``four'' from +the clause ``the following four conditions are required to be satisfied +by $S$''. Add the following two bullets to the list: \begin{quote} @@ -39,4 +25,4 @@ \item if a \tcode{memory_order::seq_cst} heavyweight-fence $X$ happens before $A$ and $B$ happens before a \tcode{memory_order::seq_cst} lightweight-fence $Y$, then $X$ precedes $Y$ in $S$. \end{itemize} -\end{quote} \ No newline at end of file +\end{quote} From 904fe7da8f6c9626d4c33582aca85a61a3ca9ee5 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 20 Oct 2023 09:21:00 -0700 Subject: [PATCH 044/114] general.tex: Remove highlighting statement Reported-by: Michael Wong Signed-off-by: Paul E. McKenney --- src/general.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/general.tex b/src/general.tex index 9994942..88baef4 100644 --- a/src/general.tex +++ b/src/general.tex @@ -8,7 +8,7 @@ \pnum {\cppstddocno} provide important context and specification for this document. This document is written as a set of changes against that specification. Instructions to modify or add paragraphs are written as -explicit instructions. Modifications made directly to existing text from {\cppstddocno} use \added{underlining} to represent added text and \removed{strikethrough} to represent deleted text. +explicit instructions. \pnum This document is non-normative. Some of the functionality described by this document may be considered for standardization in a future version of C++, but it is not currently part of any C++ standard. Some of the functionality in this document may never be standardized, and other functionality may be standardized in a substantially changed form. From 0e00247d1c01eaae138184ce68b44dc1fa9bd6f2 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 20 Oct 2023 09:23:05 -0700 Subject: [PATCH 045/114] order.tex: Remove extraneous "in" Signed-off-by: Paul E. McKenney --- src/order.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/order.tex b/src/order.tex index d0dcfe0..5a37bcb 100644 --- a/src/order.tex +++ b/src/order.tex @@ -8,7 +8,7 @@ \setcounter{subsection}{3} \rSec2[atomics.order]{Order and consistency} -Change in \CppXref{33.5.4} paragraph 4 to remove the word ``four'' from +Change \CppXref{33.5.4} paragraph 4 to remove the word ``four'' from the clause ``the following four conditions are required to be satisfied by $S$''. From 2244ef6d328b4ca9a068c3b6f40cb03367919025 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 20 Oct 2023 09:28:24 -0700 Subject: [PATCH 046/114] order.tex: Convert into from/to form Signed-off-by: Paul E. McKenney --- src/order.tex | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/order.tex b/src/order.tex index 5a37bcb..8ec9e08 100644 --- a/src/order.tex +++ b/src/order.tex @@ -8,9 +8,17 @@ \setcounter{subsection}{3} \rSec2[atomics.order]{Order and consistency} -Change \CppXref{33.5.4} paragraph 4 to remove the word ``four'' from -the clause ``the following four conditions are required to be satisfied -by $S$''. +In \CppXref{33.5.4} paragraph 4, change: + +\begin{quote} +``the following four conditions are required to be satisfied by $S$''. +\end{quote} + +to: + +\begin{quote} +``the following conditions are required to be satisfied by $S$''. +\end{quote} Add the following two bullets to the list: \begin{quote} From 84d07e832965fe9701f01d2d4e7eeec3edfd3405 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Fri, 3 Nov 2023 12:35:10 -0400 Subject: [PATCH 047/114] ISO directed we remove colour changes and replace with explicit text changes. Also update to N4968 --- README.md | 6 +++++- src/config.tex | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c0f786f..7abb482 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,12 @@ sources, or you can use the `latexmk` program e.g. `latexmk -pdf ts` will generate a PDF. \textbf{Concurrency TS2 Editor's Report} +\textbf{October 2023 pre-Kona Plenary meeting} +N4968 is the replaced PDTS of Concurrency TS V2. +It contains changes directed by ISO to remove colour changes and replace with explicit change annotations. + \textbf{August 2023 post-Varna Plenary meeting} -N4956 is the proposed PDTS of COncurrency TS Version 2. +N4956 is the proposed PDTS of Concurrency TS Version 2. It contains changes to the N4953 as directed by the committee review and author review. This version has been sent to Geneva. Some of those changes are diff --git a/src/config.tex b/src/config.tex index 8fd4ad3..7b9dbb7 100644 --- a/src/config.tex +++ b/src/config.tex @@ -1,9 +1,9 @@ %!TEX root = ts.tex %%-------------------------------------------------- %% Version numbers -\newcommand{\docno}{N4956} +\newcommand{\docno}{N4968} \newcommand{\isodocno}{ISO/IEC DTS 9922:2023(E)} -\newcommand{\prevdocno}{N4953} +\newcommand{\prevdocno}{N4895;N4953;N4956} \newcommand{\cppver}{201703L @@@} %% MW: need update \newcommand{\tsver}{202306} From 12b8cd8f9247755b38ce413a7d3db39a297b5c11 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 15 Dec 2023 10:21:32 -0800 Subject: [PATCH 048/114] First round of updates from second TS feedback Signed-off-by: Paul E. McKenney --- src/general.tex | 53 ++++++++++++++++++++++------------------------- src/syncvalue.tex | 4 ++-- 2 files changed, 27 insertions(+), 30 deletions(-) diff --git a/src/general.tex b/src/general.tex index 88baef4..0477811 100644 --- a/src/general.tex +++ b/src/general.tex @@ -3,15 +3,15 @@ \rSec0[scope]{Scope} \pnum -This document describes requirements for implementations of an interface that computer programs written in the C++ programming language may use to invoke algorithms with concurrent execution. The algorithms described by this document are realizable across a broad class of computer architectures. +This document describes requirements for implementations of an interface that computer programs written in the C++ programming language could use to invoke algorithms with concurrent execution. The algorithms described by this document are realizable across a broad class of computer architectures. \pnum -{\cppstddocno} provide important context and specification for +This document provides important context and specification for this document. This document is written as a set of changes against that specification. Instructions to modify or add paragraphs are written as explicit instructions. \pnum -This document is non-normative. Some of the functionality described by this document may be considered for standardization in a future version of C++, but it is not currently part of any C++ standard. Some of the functionality in this document may never be standardized, and other functionality may be standardized in a substantially changed form. +Some of the functionality described by this document might be considered for standardization in a future version of C++, but it is not currently part of any C++ standard. Some of the functionality in this document might never be standardized, and other functionality might be standardized in a substantially changed form. \pnum The goal of this document is to build widespread existing practice for concurrency in the C++ standard algorithms library. It gives advice on extensions to those vendors who wish to provide them. @@ -22,12 +22,9 @@ The following referenced document is indispensable for the application of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies. \begin{itemize} -\item {\cppstddocno}, \doccite{Programming Languages --- C++} +\item ISO/IEC 14882:2020, \doccite{Programming Languages --- C++} \end{itemize} -\pnum -ISO/IEC 14882:2020 is herein called the C++ Standard. References to clauses within the C++ Standard are written as ``\CppXref{3.2}''. The library described in \CppXref{16-32} is herein called the C++ Standard Library. - \pnum Unless otherwise specified, the whole of the C++ Standard's Library introduction (\CppXref{16}) is included into this Technical Specification by reference. @@ -49,12 +46,12 @@ \pnum Conformance requirements for this document are those defined in \CppXref{4.1}, as applied to a merged document consisting of C++20 amended by this document. \begin{note} -Conformance is defined in terms of the behavior of programs. +Conformance is defined in terms of the behaviour of programs. \end{note} \rSec1[general.namespaces]{Namespaces and headers and modifications to standard classes} \pnum -Since the extensions described in this technical specification are experimental and not part of the C++ standard library, they are not declared directly within namespace \tcode{std}. Unless otherwise specified, all components described in this technical specification either: +Since the extensions described in this document are experimental and not part of the C++ standard library, they are not declared directly within namespace \tcode{std}. Unless otherwise specified, all components described in this document either: \begin{itemize} \item modify an existing interface in the C++ Standard Library in-place, @@ -79,7 +76,7 @@ \end{note} \pnum -These are the headers described in this document (see Table~\ref{tab:info.headers}) +Table~\ref{tab:info.headers} presents the headers described in this document %%shall import the contents of %%\tcode{::std::experimental::concurrency::v2} into %%\tcode{::std::experimental::concurrency_v1} as if by: @@ -158,28 +155,28 @@ \end{floattable} -\rSec1[general.plans]{Future plans (Informative)} -\pnum -This section describes tentative plans for future versions of this technical specification and plans for moving content into -future versions of the C++ Standard. +% \rSec1[general.plans]{Future plans (Informative)} +% \pnum +% This clause describes tentative plans for future versions of this document and plans for moving content into +% future versions of the C++ Standard. -\pnum - The C++ committee intends to release a new version of this technical specification approximately every few years, containing -the concurrency extensions we hope to add to a near-future version of the C++ Standard. Future versions will define their -contents in \tcode{std::experimental::concurrency\_v3}, \tcode{std::experimental::concurrency\_v4}, etc., with the most recent -implemented version inlined into \tcode{std::ex\-perimental}. +% \pnum +% The C++ committee intends to release a new version of this document approximately every few years, containing +% the concurrency extensions we hope to add to a near-future version of the C++ Standard. Future versions will define their +% contents in \tcode{std::experimental::concurrency\_v3}, \tcode{std::experimental::concurrency\_v4}, etc., with the most recent +% implemented version inlined into \tcode{std::ex\-perimental}. -\pnum -When an extension defined in this or a future version of this technical specification represents enough existing practice, it -will be moved into the next version of the C++ Standard by removing the \tcode{experimental::con\-currency\_v$N$} segment of its -namespace and by removing the \tcode{experimental/} prefix from its header's path. +% \pnum +% When an extension defined in this or a future version of this document represents enough existing practice, it +% will be moved into the next version of the C++ Standard by removing the \tcode{experimental::con\-currency\_v$N$} segment of its +% namespace and by removing the \tcode{experimental/} prefix from its header's path. -\rSec1[general.ack]{Acknowledgments} +% \rSec1[general.ack]{Acknowledgments} -This work is the result of a collaboration of researchers in industry and academia. We wish to thank the -original authors of this document, Michael Wong, Paul McKenney, and Maged Michael, and the editing review team of Jonathan Wakely, Daniel Krügler, and Bryan St. Amour. We also wish to thank people -who made valuable contributions within and outside these groups, including Jens Maurer, and many others not named -here who contributed to the discussion. +% This work is the result of a collaboration of researchers in industry and academia. We wish to thank the +% original authors of this document, Michael Wong, Paul McKenney, and Maged Michael, and the editing review team of Jonathan Wakely, Daniel Krügler, and Bryan St. Amour. We also wish to thank people +% who made valuable contributions within and outside these groups, including Jens Maurer, and many others not named +% here who contributed to the discussion. diff --git a/src/syncvalue.tex b/src/syncvalue.tex index 1f2585d..60b9e5c 100644 --- a/src/syncvalue.tex +++ b/src/syncvalue.tex @@ -129,8 +129,8 @@ return invoke(std::forward(f),values.@\emph{value}@...); \end{codeblock} -\begin{note} A single instance of \tcode{synchronized_value} can not be -passed more than once to the same invocation of \tcode{apply}. +\begin{note} It is not possible to pass a single instance of \tcode{synchronized_value} +more than once to the same invocation of \tcode{apply}. \begin{example} \begin{codeblock} From b64c5f429660f0a086c026507d97f8b3d7a5357f Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Wed, 28 Feb 2024 16:28:36 -0500 Subject: [PATCH 049/114] Update 33.5.4 to remove the word change to satisfy iso editors --- src/order.tex | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/order.tex b/src/order.tex index 8ec9e08..71725dd 100644 --- a/src/order.tex +++ b/src/order.tex @@ -8,19 +8,20 @@ \setcounter{subsection}{3} \rSec2[atomics.order]{Order and consistency} -In \CppXref{33.5.4} paragraph 4, change: +In \CppXref{33.5.4} paragraph 4, instead of: \begin{quote} ``the following four conditions are required to be satisfied by $S$''. \end{quote} -to: +this document requires: \begin{quote} ``the following conditions are required to be satisfied by $S$''. \end{quote} -Add the following two bullets to the list: +In addition to the items in the bulleted list, this document has the +following requirements: \begin{quote} %%\setcounter{Paras}{3} \pnum From dff7224c6f80a5ac30cc937cd738bf9a0b529403 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 1 Mar 2024 15:36:45 -0800 Subject: [PATCH 050/114] Global: s/behavior/behaviour/ Signed-off-by: Paul E. McKenney --- src/macros.tex | 4 ++-- src/srHP.tex | 4 ++-- src/srrcu.tex | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/macros.tex b/src/macros.tex index ca96745..8923208 100644 --- a/src/macros.tex +++ b/src/macros.tex @@ -322,7 +322,7 @@ \newcommand{\Fundescx}[1]{\textit{#1}} \newcommand{\Fundesc}[1]{\Fundescx{#1}:\space} \newcommand{\recommended}{\Fundesc{Recommended practice}} -\newcommand{\required}{\Fundesc{Required behavior}} +\newcommand{\required}{\Fundesc{Required behaviour}} \newcommand{\constraints}{\Fundesc{Constraints}} \newcommand{\mandates}{\Fundesc{Mandates}} \newcommand{\expects}{\Fundesc{Preconditions}} @@ -330,7 +330,7 @@ \newcommand{\ensures}{\Fundesc{Postconditions}} \newcommand{\returns}{\Fundesc{Returns}} \newcommand{\throws}{\Fundesc{Throws}} -\newcommand{\default}{\Fundesc{Default behavior}} +\newcommand{\default}{\Fundesc{Default behaviour}} \newcommand{\complexity}{\Fundesc{Complexity}} \newcommand{\remarks}{\Fundesc{Remarks}} \newcommand{\errors}{\Fundesc{Error conditions}} diff --git a/src/srHP.tex b/src/srHP.tex index 37aedde..dc2a9f2 100644 --- a/src/srHP.tex +++ b/src/srHP.tex @@ -240,7 +240,7 @@ for which, given a value \tcode{d} of type \tcode{D} and a value \tcode{ptr} of type \tcode{T*}, the expression \tcode{d(ptr)} is valid and has the effect of disposing of the pointer as appropriate for that deleter. \pnum -The behavior of a program that adds specializations for \tcode{hazard_pointer_obj_base} is undefined. +The behaviour of a program that adds specializations for \tcode{hazard_pointer_obj_base} is undefined. \pnum \tcode{D} shall meet the requirements for \oldconcept{DefaultConstructible} and \oldconcept{MoveAssignable}. @@ -261,7 +261,7 @@ \pnum \expects \tcode{*this} is a base class subobject of an object \tcode{x} of type \tcode{T}. \tcode{x} is not retired. -Move-assigning \tcode{D} from \tcode{d} does not throw an exception. The expression \tcode{d(addressof(x))} has well-defined behavior and does not throw an exception. +Move-assigning \tcode{D} from \tcode{d} does not throw an exception. The expression \tcode{d(addressof(x))} has well-defined behaviour and does not throw an exception. \pnum \effects diff --git a/src/srrcu.tex b/src/srrcu.tex index 1aa131d..3a0deee 100644 --- a/src/srrcu.tex +++ b/src/srrcu.tex @@ -110,7 +110,7 @@ that deleter. \pnum -The behavior of a program that adds specializations for +The behaviour of a program that adds specializations for \tcode{rcu_obj_base} is undefined. \pnum @@ -141,7 +141,7 @@ \tcode{rcu_obj_base::retire} was not invoked on \tcode{x} before. The assignment to \exposid{deleter} does not throw an exception. The expression \tcode{\exposid{deleter}(addressof(x))} has -well-defined behavior and does not throw an exception. +well-defined behaviour and does not throw an exception. \pnum \effects From 29e86c29fe93ead8f07991824e12b537fde6f449 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 1 Mar 2024 16:12:44 -0800 Subject: [PATCH 051/114] Global: Make notes and examples conform, maybe One thing left over: Any instance of a NOTE 1 that does not have a NOTE 2 must omit the number, so "NOTE" rather than "NOTE 1". Unless someone has some bright ideas, this is a manual operation. Maybe like this for maintainability: %\begin{note} [NOTE: .... ]%\end{note} I don't know if "NOTE" is supposed to be enclosed in "[]". I am assuming that it is. I don't know if the "--- end EXAMPLE]" is OK. I can make it work like the note environment if that is the intent. Signed-off-by: Paul E. McKenney --- src/asymmetric.tex | 5 ++--- src/bytewiseatomic.tex | 7 +++---- src/general.tex | 9 +++------ src/macros.tex | 25 +++++++++++++++++++++---- src/srHP.tex | 12 ++++++------ src/srrcu.tex | 18 ++++++------------ src/syncvalue.tex | 6 ++---- 7 files changed, 43 insertions(+), 39 deletions(-) diff --git a/src/asymmetric.tex b/src/asymmetric.tex index 8bbb1ae..41ba09e 100644 --- a/src/asymmetric.tex +++ b/src/asymmetric.tex @@ -31,7 +31,7 @@ are included in the total order \tcode{S} on \tcode{memory_order::seq_cst} operations). A heavyweight-fence has all the synchronization effects of a fence (\CppXref{31.11}). \begin{note} Heavyweight-fences and -lightweight-fences are distinct from fences. \end{note} +lightweight-fences are distinct from fences.\end{note} \pnum A heavyweight-fence with acquire semantics is called an \defn{acquire heavyweight-fence}. A @@ -108,7 +108,6 @@ techniques in which calls to \tcode{asymmetric_thread_fence_light} execute more quickly than calls to \tcode{atomic_thread_fence} with the same \tcode{memory_order}, at the cost of \tcode{asymmetric_thread_fence_heavy} executing more slowly than calls to -\tcode{atomic_thread_fence} with the same \tcode{memory_order} -\end{note} +\tcode{atomic_thread_fence} with the same \tcode{memory_order}\end{note} diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex index c7146ff..89f1e0a 100644 --- a/src/bytewiseatomic.tex +++ b/src/bytewiseatomic.tex @@ -28,7 +28,7 @@ programming idioms in which values may be read while being written, but the value is trusted only when it can be determined after the fact that a race did not occur. \begin{note} So-called "seqlocks" are the canonical -example of such an idiom. \end{note} +example of such an idiom.\end{note} \rSec1[atomiccpy.load]{\tcode{atomic_load_per_byte_memcpy}} @@ -60,7 +60,7 @@ sequence of bytes to the destination. \begin{note} There is no requirement that the individual bytes be copied in order, or that the implementation -must operate on individual bytes. \end{note} +must operate on individual bytes.\end{note} \pnum \returns @@ -99,6 +99,5 @@ \tcode{memory_order::acquire} argument take their value from an atomic byte store performed by \tcode{atomic_store_per_byte_memcpy()} call B with \tcode{memory_order::release} argument, then the start of B -strongly happens before the completion of A. -\end{note} +strongly happens before the completion of A.\end{note} %%\end{quote} diff --git a/src/general.tex b/src/general.tex index 0477811..96ca93d 100644 --- a/src/general.tex +++ b/src/general.tex @@ -46,8 +46,7 @@ \pnum Conformance requirements for this document are those defined in \CppXref{4.1}, as applied to a merged document consisting of C++20 amended by this document. \begin{note} -Conformance is defined in terms of the behaviour of programs. -\end{note} +Conformance is defined in terms of the behaviour of programs.\end{note} \rSec1[general.namespaces]{Namespaces and headers and modifications to standard classes} \pnum @@ -66,14 +65,12 @@ as-if by performing unqualified name lookup in the context of \tcode{D}. \begin{note} -Argument-dependent lookup is not performed. -\end{note} +Argument-dependent lookup is not performed.\end{note} Similarly, the meaning of a \grammarterm{qualified-id} is established as-if by performing qualified name lookup in the context of \tcode{D}. \begin{note} -Operators in expressions are not so constrained. -\end{note} +Operators in expressions are not so constrained.\end{note} \pnum Table~\ref{tab:info.headers} presents the headers described in this document diff --git a/src/macros.tex b/src/macros.tex index 8923208..7aceb7c 100644 --- a/src/macros.tex +++ b/src/macros.tex @@ -280,8 +280,8 @@ \newcommand{\leftshift}[1]{\ensuremath{\mathbin{\mathsf{lshift}_{#1}}}} %% Notes and examples -\newcommand{\noteintro}[1]{[\textit{#1}:} -\newcommand{\noteoutro}[1]{\textit{\,---\,#1}\kern.5pt]} +\newcommand{\noteintro}[1]{[#1:} +\newcommand{\noteoutro}[1]{\,---\,#1\kern.5pt]} % \newnoteenvironment{ENVIRON}{BEGIN TEXT}{END TEXT} % Creates a note-like environment beginning with BEGIN TEXT and @@ -293,14 +293,31 @@ \newsubclausecounter{#1} \newenvironment{tail#1} {\par\small\stepcounter{#1}\noteintro{#2}} +{]} +\newenvironment{#1} +{\begin{tail#1}} +{\end{tail#1}\small\par} % \small\par is for C++20 post-DIS compatibility +} + +\newnoteenvironment{note}{NOTE \arabic{note}}{end note} + +% \newexplenvironment{ENVIRON}{BEGIN TEXT}{END TEXT} +% Creates an example-like environment beginning with BEGIN TEXT and +% ending with END TEXT. A counter with name ENVIRON indicates the +% number of this kind of note / example that has occurred in this +% subclause. +% Use tailENVIRON to avoid inserting a \par at the end. +\newcommand{\newexplenvironment}[3]{ +\newsubclausecounter{#1} +\newenvironment{tail#1} +{\par\small\stepcounter{#1}\noteintro{#2}} {\noteoutro{#3}} \newenvironment{#1} {\begin{tail#1}} {\end{tail#1}\small\par} % \small\par is for C++20 post-DIS compatibility } -\newnoteenvironment{note}{Note \arabic{note}}{end note} -\newnoteenvironment{example}{Example \arabic{example}}{end example} +\newexplenvironment{example}{EXAMPLE \arabic{example}}{end EXAMPLE} \makeatletter \let\footnote\@undefined diff --git a/src/srHP.tex b/src/srHP.tex index dc2a9f2..6c51c6c 100644 --- a/src/srHP.tex +++ b/src/srHP.tex @@ -17,7 +17,7 @@ A hazard pointer \defn{belongs to} exactly one \defn{domain}. \pnum -An object of type \tcode{hazard_pointer} is either empty or \defn{owns} a hazard pointer. Each hazard pointer is owned by exactly one object of type \tcode{hazard_pointer}. \begin{note} An empty \tcode{hazard_pointer} object is different from a \tcode{hazard_pointer} object that owns an unassociated hazard pointer. An empty \tcode{hazard_pointer} object does not own any hazard pointers. \end{note} +An object of type \tcode{hazard_pointer} is either empty or \defn{owns} a hazard pointer. Each hazard pointer is owned by exactly one object of type \tcode{hazard_pointer}. \begin{note} An empty \tcode{hazard_pointer} object is different from a \tcode{hazard_pointer} object that owns an unassociated hazard pointer. An empty \tcode{hazard_pointer} object does not own any hazard pointers.\end{note} \pnum An object \tcode{x} of hazard-protectable type \tcode{T} is \defn{retired} to a domain with a deleter of type \tcode{D} when the member function \tcode{hazard_pointer_obj_base::retire} is invoked on \tcode{x}. Any given object \tcode{x} shall be retired at most once. @@ -50,9 +50,9 @@ \item if the beginning of $E$ happens before \tcode{x} is retired, the end of $E$ strongly happens before $A$, and \item if $E$ began by an evaluation of \tcode{try_protect} with argument \tcode{src}, label its -atomic load operation $L$. If there exists an atomic modification $B$ on \tcode{src} such that $L$ observes a modification that is modification-ordered before $B$, and $B$ happens before \tcode{x} is retired, the end of $E$ strongly happens before $A$. \begin{note} In typical use, a store to \tcode{src} sequenced before retiring \tcode{x} will be such an atomic operation $B$. \end{note} +atomic load operation $L$. If there exists an atomic modification $B$ on \tcode{src} such that $L$ observes a modification that is modification-ordered before $B$, and $B$ happens before \tcode{x} is retired, the end of $E$ strongly happens before $A$. \begin{note} In typical use, a store to \tcode{src} sequenced before retiring \tcode{x} will be such an atomic operation $B$.\end{note} \end{itemize} -\begin{note} The latter two conditions convey the informal notion that a protection epoch that began before retiring \tcode{x}, as implied either by the happens-before relation or the coherence order of some source, delays the reclamation of \tcode{x}. \end{note} +\begin{note} The latter two conditions convey the informal notion that a protection epoch that began before retiring \tcode{x}, as implied either by the happens-before relation or the coherence order of some source, delays the reclamation of \tcode{x}.\end{note} \end{itemize} \begin{example} The following example shows how hazard pointers allow updates to be carried out in the presence of concurrent readers. The object of type \tcode{hazard_pointer} in \tcode{print_name} protects the object \tcode{*ptr} from being reclaimed by \tcode{ptr->retire} until the end of the protection epoch. @@ -114,7 +114,7 @@ The bound is implementation-defined. \begin{note} The bound can be independent of other domains and can be a function of the number of hazard pointers belonging to the domain, the number of threads that retire objects to the domain, and the number of -threads that use hazard pointers belonging to the domain. \end{note} +threads that use hazard pointers belonging to the domain.\end{note} \pnum Concurrent access to a domain does not incur a data race (\CppXref{6.9.2.1}). @@ -427,7 +427,7 @@ \pnum \returns -\tcode{old == ptr}. \begin{note} It is possible for \tcode{try_protect} to return \tcode{true} when \tcode{ptr} is a null pointer. \end{note} +\tcode{old == ptr}. \begin{note} It is possible for \tcode{try_protect} to return \tcode{true} when \tcode{ptr} is a null pointer.\end{note} \pnum \complexity @@ -479,7 +479,7 @@ \pnum \effects -Swaps the hazard pointer ownership of this object with that of other. \begin{note} The owned hazard pointers, if any, remain unchanged during the swap and continue to be associated with the respective objects that they were protecting before the swap, if any. No protection epochs are ended or initiated. \end{note} +Swaps the hazard pointer ownership of this object with that of other. \begin{note} The owned hazard pointers, if any, remain unchanged during the swap and continue to be associated with the respective objects that they were protecting before the swap, if any. No protection epochs are ended or initiated.\end{note} \pnum \complexity diff --git a/src/srrcu.tex b/src/srrcu.tex index 3a0deee..138ae2c 100644 --- a/src/srrcu.tex +++ b/src/srrcu.tex @@ -32,8 +32,7 @@ before $L'$ and $L'$ is sequenced before $U'$. \end{itemize} \begin{note} -This pairs nested locks and unlocks on a given domain in each thread. -\end{note} +This pairs nested locks and unlocks on a given domain in each thread.\end{note} \pnum A \defn{region of RCU protection} on a domain \tcode{dom} starts @@ -155,8 +154,7 @@ function. \begin{note} If such evaluations acquire resources held across any invocation of -retire on \tcode{dom}, deadlock can occur. -\end{note} +retire on \tcode{dom}, deadlock can occur.\end{note} \end{itemdescr} @@ -231,13 +229,11 @@ function. \begin{note} If such evaluations acquire resources held across any invocation -of \tcode{unlock} on \tcode{*this}, deadlock can occur. -\end{note} +of \tcode{unlock} on \tcode{*this}, deadlock can occur.\end{note} Calls to the function \tcode{unlock} do not introduce a data race involving \tcode{*this}. \begin{note} -Evaluation of scheduled evaluations can still cause a data race. -\end{note} +Evaluation of scheduled evaluations can still cause a data race.\end{note} \end{itemdescr} @@ -332,8 +328,7 @@ \tcode{dom}. \begin{note} If \tcode{rcu_retire} exits via an exception, no evaluation -is scheduled. -\end{note} +is scheduled.\end{note} \pnum \throws @@ -348,7 +343,6 @@ function. \begin{note} If such evaluations acquire resources held across any invocation -of \tcode{rcu_retire} on \tcode{dom}, deadlock can occur. -\end{note} +of \tcode{rcu_retire} on \tcode{dom}, deadlock can occur.\end{note} \end{itemdescr} diff --git a/src/syncvalue.tex b/src/syncvalue.tex index 60b9e5c..1b928f5 100644 --- a/src/syncvalue.tex +++ b/src/syncvalue.tex @@ -138,11 +138,9 @@ void f(int,int); apply(f,sv,sv); // undefined behaviour, sv passed more than once to same call \end{codeblock} -\end{example} - \end{note} +\end{example}\end{note} \begin{note} The invocation of \tcode{f} can not call \tcode{apply} -directly or indirectly passing any of \tcode{values...}. -\end{note} +directly or indirectly passing any of \tcode{values...}.\end{note} \end{itemdescr} From 7d3764f2f12d4206802eb45c4a30e3dcbcfbf716 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 1 Mar 2024 16:22:14 -0800 Subject: [PATCH 052/114] bytewiseatomic: Example showing proposed "NOTE:" Signed-off-by: Paul E. McKenney --- src/bytewiseatomic.tex | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex index 89f1e0a..bedb8d1 100644 --- a/src/bytewiseatomic.tex +++ b/src/bytewiseatomic.tex @@ -27,8 +27,11 @@ \tcode{atomic_store_per_byte_memcpy()} functions support concurrent programming idioms in which values may be read while being written, but the value is trusted only when it can be determined after the fact that -a race did not occur. \begin{note} So-called "seqlocks" are the canonical -example of such an idiom.\end{note} +a race did not occur. + +%\begin{note} +[NOTE: So-called "seqlocks" are the canonical +example of such an idiom.]%\end{note} \rSec1[atomiccpy.load]{\tcode{atomic_load_per_byte_memcpy}} @@ -58,9 +61,11 @@ each other. The function implicitly creates objects (\CppXref{6.7.2}) in the destination region of storage immediately prior to copying the sequence of bytes to the destination. -\begin{note} There is no requirement + +%\begin{note} +[NOTE: There is no requirement that the individual bytes be copied in order, or that the implementation -must operate on individual bytes.\end{note} +must operate on individual bytes.]%\end{note} \pnum \returns @@ -94,10 +99,11 @@ \tcode{dest}. \end{itemdescr} -\begin{note} If any of the atomic byte loads performed by an +%\begin{note} +[NOTE: If any of the atomic byte loads performed by an \tcode{atomic_load_per_byte_memcpy()} call A with \tcode{memory_order::acquire} argument take their value from an atomic byte store performed by \tcode{atomic_store_per_byte_memcpy()} call B with \tcode{memory_order::release} argument, then the start of B -strongly happens before the completion of A.\end{note} +strongly happens before the completion of A.]%\end{note} %%\end{quote} From 6fad941c38811b40fe72a315377f1e13418fcf63 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Mon, 4 Mar 2024 09:49:35 -0500 Subject: [PATCH 053/114] Michael's page 4/5 updates. --- src/general.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/general.tex b/src/general.tex index 96ca93d..42a8139 100644 --- a/src/general.tex +++ b/src/general.tex @@ -62,18 +62,18 @@ Whenever an unqualified name is used in the specification of a declaration \tcode{D}, its meaning is established -as-if by performing unqualified name lookup +as-if in accordance with (\CppXref{4.1.2}) by performing unqualified name lookup in the context of \tcode{D}. \begin{note} Argument-dependent lookup is not performed.\end{note} Similarly, the meaning of a \grammarterm{qualified-id} is established -as-if by performing qualified name lookup +as-if ina accordance with by performing qualified name lookup in the context of \tcode{D}. \begin{note} Operators in expressions are not so constrained.\end{note} \pnum -Table~\ref{tab:info.headers} presents the headers described in this document +Table~\ref{tab:info.headers} shows the headers described in this document %%shall import the contents of %%\tcode{::std::experimental::concurrency::v2} into %%\tcode{::std::experimental::concurrency_v1} as if by: @@ -95,9 +95,9 @@ \end{floattable} -\rSec1[general.feature.test]{Feature-testing recommendations (Informative)} +\rSec1[general.feature.test]{Feature-testing recommendations } \pnum -An implementation that provides support for this document should define each feature test macro defined in \tref{intro.features1} and \tref{intro.features2} if no associated headers are indicated for that macro, and if associated headers are indicated for a macro, that macro is defined after inclusion of one of the corresponding headers specified in the table. +An implementation that provides support for this document should define each feature test macro defined in \tref{intro.features1} and \tref{intro.features2} if no associated headers are indicated for that macro, and if associated headers are indicated for a macro, that macro is defined after inclusion of one of the corresponding headers specified in \tref{intro.features1} and \tref{intro.features2}. %%\begin{floattable}{Feature-test macros name}{tab:intro.features} %%{lllll} From 05ae445e6a82997fe1dbf357be16b481fb1426ab Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 5 Mar 2024 15:46:58 -0800 Subject: [PATCH 054/114] Add \CppXrefInAccord macro for "in accordance..." wording So that "(\CppXrefInAccord{6.7.2})" generates "(in accordance with ISO/IEC 14882:2020, 6.7.2)". Signed-off-by: Paul E. McKenney --- src/ts.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ts.tex b/src/ts.tex index b0d0b9c..ca65a02 100644 --- a/src/ts.tex +++ b/src/ts.tex @@ -61,6 +61,7 @@ \newcommand{\DEDUCED}{\textit{\texttt{DEDUCED}}} \newcommand{\nativeref}{see~\ref{socket.reqmts.native}} \newcommand{\CppXref}[1]{\texorpdfstring{C\kern-0.05em\protect\raisebox{.35ex}{\textsmaller[2]{+\kern-0.05em+}}20}{C++20} \S#1} +\newcommand{\CppXrefInAccord}[1]{in accordance with ISO/IEC 14882:2020, #1} % Alternative formatting of cross-references, resolving stable name to number. % Needs include{cxx} and CppXIV from cplusplus/draft/source/macros.tex. % \input{cxx} From a2fdbd58f3cae00a9502e842ff79af5d0c622dc3 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 5 Mar 2024 15:47:50 -0800 Subject: [PATCH 055/114] bytewiseatomic: Remove paragraph numbers and expand std ref Signed-off-by: Paul E. McKenney --- src/bytewiseatomic.tex | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex index bedb8d1..7438b5a 100644 --- a/src/bytewiseatomic.tex +++ b/src/bytewiseatomic.tex @@ -21,7 +21,7 @@ %%\uline{\texttt{\ namespace\ std::experimental::inline\ %%concurrency\_v2\ \{\ \ ~~void*\ %%atomic\_load\_per\_byte\_memcpy(void*\ dest,\ const\ void*\ %%source,\ size\_t\ count,\ memory\_order\ order);\ \ ~~void*\ %%atomic\_store\_per\_byte\_memcpy(void*\ dest,\ const\ void*\ %%source,\ size\_t\ count,\ memory\_order\ order);\ \ ~~\#define\ %%\_\_cpp\_lib\_experimental\_bytewise\_atomic\_memcpy\ \ %%202XYYL\ \}}} %%\rSec1[bytewiseatomicmemcpy.general]{General} -\pnum +% \pnum The \tcode{atomic_load_per_byte_memcpy()} and \tcode{atomic_store_per_byte_memcpy()} functions support concurrent @@ -35,7 +35,8 @@ \rSec1[atomiccpy.load]{\tcode{atomic_load_per_byte_memcpy}} -\pnum +% \pnum + The \tcode{atomic_load_per_byte_memcpy} / \tcode{atomic_store_per_byte_memcpy} functions behave as if the \tcode{source} and \tcode{dest} bytes respectively were individual @@ -44,7 +45,8 @@ \textbf{\tcode{void*\ atomic_load_per_byte_memcpy(void* dest, const void* source, size_t count, memory_order order);}} \begin{itemdescr} -\pnum +% \pnum + \expects \tcode{order} is \tcode{memory_order::acquire} or @@ -52,13 +54,13 @@ and \tcode{(const char*)source + [0, count)} are valid ranges that do not overlap. -\pnum +% \pnum \effects Copies \tcode{count} consecutive bytes pointed to by \tcode{source} into consecutive bytes pointed to by \tcode{dest}. Each individual load operation from a source byte is atomic with memory order \tcode{order}. These individual loads are unsequenced with respect to -each other. The function implicitly creates objects (\CppXref{6.7.2}) +each other. The function implicitly creates objects (\CppXrefInAccord{7.2}) in the destination region of storage immediately prior to copying the sequence of bytes to the destination. @@ -67,7 +69,7 @@ that the individual bytes be copied in order, or that the implementation must operate on individual bytes.]%\end{note} -\pnum +% \pnum \returns \tcode{dest}. \end{itemdescr} @@ -76,24 +78,25 @@ \textbf{\tcode{void* atomic_store_per_byte_memcpy(void* dest, const void* source, size_t count, memory_order order);}} \begin{itemdescr} -\pnum +% \pnum + \expects \tcode{order} is \tcode{memory_order::release} or \tcode{memory_order::relaxed}. \tcode{(char*)dest + [0, count)} and \tcode{(const char*)source + [0, count)} are valid ranges that do not overlap. -\pnum +% \pnum \effects Copies \tcode{count} consecutive bytes pointed to by \tcode{source} into consecutive bytes pointed to by \tcode{dest}. Each individual store operation to a destination byte is atomic with memory order \tcode{order}. These individual stores are unsequenced with respect to each other. The function implicitly creates objects -(\CppXref{6.7.2}) in the destination region of storage immediately +(\CppXrefInAccord{6.7.2}) in the destination region of storage immediately prior to copying the sequence of bytes to the destination. -\pnum +% \pnum \returns \tcode{dest}. From ba759ceadcbc56885b612214d60d2bb6d9bb8fca Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 5 Mar 2024 15:51:57 -0800 Subject: [PATCH 056/114] srrcu: Remove paragraph numbers by commenting out \pnum Signed-off-by: Paul E. McKenney --- src/srrcu.tex | 60 +++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/srrcu.tex b/src/srrcu.tex index 138ae2c..eca211c 100644 --- a/src/srrcu.tex +++ b/src/srrcu.tex @@ -4,20 +4,20 @@ \rSec2[saferecl.rcu.general]{General} -\pnum +% \pnum RCU is a synchronization mechanism that can be used for linked data structures that are frequently read, but seldom updated. RCU does not provide mutual exclusion, but instead allows the user to schedule specified actions such as deletion at some later time. -\pnum +% \pnum A class type \tcode{T} is \defn{rcu-protectable} if it has exactly one public base class of type \tcode{rcu_obj_base} for some \tcode{D} and no base classes of type \tcode{rcu_obj_base} for any other combination \tcode{X}, \tcode{Y}. An object is rcu-protectable if it is of rcu-protectable type. -\pnum +% \pnum An invocation of \tcode{unlock} $U$ on an \tcode{rcu_domain dom} corresponds to an invocation of \tcode{lock} $L$ on \tcode{dom} if $L$ is sequenced before $U$ and either @@ -34,19 +34,19 @@ \begin{note} This pairs nested locks and unlocks on a given domain in each thread.\end{note} -\pnum +% \pnum A \defn{region of RCU protection} on a domain \tcode{dom} starts with a \tcode{lock} $L$ on \tcode{dom} and ends with its corresponding \tcode{unlock} $U$. -\pnum +% \pnum Given a region of RCU protection $R$ on a domain \tcode{dom} and given an evaluation $E$ that scheduled another evaluation $F$ in \tcode{dom}, if $E$ does not strongly happen before the start of $R$, the end of $R$ strongly happens before evaluating $F$. -\pnum +% \pnum The evaluation of a scheduled evaluation is potentially concurrent with any other such evaluation. Each scheduled evaluation is evaluated at most once. @@ -100,7 +100,7 @@ }; \end{codeblock} -\pnum +% \pnum A client-supplied template argument \tcode{D} shall be a function object type \CppXref{20.14} for which, given a value \tcode{d} of type \tcode{D} and a value \tcode{ptr} @@ -108,18 +108,18 @@ has the effect of disposing of the pointer as appropriate for that deleter. -\pnum +% \pnum The behaviour of a program that adds specializations for \tcode{rcu_obj_base} is undefined. -\pnum +% \pnum \tcode{D} shall meet the requirements for \oldconcept{DefaultConstructible} and \oldconcept{MoveAssignable}. -\pnum +% \pnum \tcode{T} may be an incomplete type. -\pnum +% \pnum If \tcode{D} is trivially copyable, all specializations of \tcode{rcu_obj_base} are trivially copyable. @@ -129,11 +129,11 @@ \begin{itemdescr} -\pnum +% \pnum \mandates \tcode{T} is an rcu-protectable type. -\pnum +% \pnum \expects \tcode{*this} is a base class subobject of an object \tcode{x} of type \tcode{T}. The member function @@ -142,12 +142,12 @@ exception. The expression \tcode{\exposid{deleter}(addressof(x))} has well-defined behaviour and does not throw an exception. -\pnum +% \pnum \effects Evaluates \tcode{\exposid{deleter} = std::move(d)} and schedules the evaluation of the expression \tcode{de\-let\-er(ad\-dress\-of(x))} in the domain \tcode{dom}. -\pnum +% \pnum \remarks It is implementation-defined whether or not scheduled evaluations in \tcode{dom} can be invoked by the \tcode{retire} @@ -192,11 +192,11 @@ \begin{itemdescr} -\pnum +% \pnum \effects Opens a region of RCU protection. -\pnum +% \pnum \remarks Calls to the function lock do not introduce a data race (\CppXref{6.9.2.1}) involving \tcode{*this}. @@ -211,18 +211,18 @@ \begin{itemdescr} -\pnum +% \pnum \expects A call to the function \tcode{lock} that opened an unclosed region of RCU protection is sequenced before the call to \tcode{unlock}. -\pnum +% \pnum \effects Closes the unclosed region of RCU protection that was most recently opened. -\pnum +% \pnum \remarks It is implementation-defined whether or not scheduled evaluations in \tcode{*this} can be invoked by the \tcode{unlock} @@ -245,7 +245,7 @@ \begin{itemdescr} -\pnum +% \pnum \returns A reference to the default object of type \tcode{rcu_domain}. A reference to the same object is returned every time this @@ -261,14 +261,14 @@ \begin{itemdescr} -\pnum +% \pnum \effects If the call to \tcode{rcu_synchronize} does not strongly happen before the lock opening an RCU protection region \tcode{R} on \tcode{dom}, blocks until the \tcode{unlock} closing \tcode{R} happens. -\pnum +% \pnum \sync The \tcode{unlock} closing \tcode{R} strongly happens before the return from \tcode{rcu_synchronize}. @@ -283,14 +283,14 @@ \begin{itemdescr} -\pnum +% \pnum \effects May evaluate any scheduled evaluations in \tcode{dom}. For any evaluation that happens before the call to \tcode{rcu_barrier} and that schedules an evaluation $E$ in \tcode{dom}, blocks until $E$ has been evaluated. -\pnum +% \pnum \sync The evaluation of any such $E$ strongly happens before the return from \tcode{rcu_barrier}. @@ -306,18 +306,18 @@ \begin{itemdescr} -\pnum +% \pnum \mandates \tcode{is_move_constructible_v} is true. -\pnum +% \pnum \expects \tcode{D} meets the \oldconcept{MoveConstructible} and \oldconcept{Destructible} requirements. The expression \tcode{d1(p)}, where \tcode{d1} is defined below, is well-formed and its evaluation does not exit via an exception. -\pnum +% \pnum \effects May allocate memory. It is unspecified whether the memory allocation is performed by @@ -330,13 +330,13 @@ If \tcode{rcu_retire} exits via an exception, no evaluation is scheduled.\end{note} -\pnum +% \pnum \throws Any exception that would be caught by a handler of type \tcode{bad_alloc}. Any exception thrown by the initialization of \tcode{d1}. -\pnum +% \pnum \remarks It is implementation-defined whether or not scheduled evaluations in dom can be invoked by the \tcode{rcu_retire} From 88cfcc7cbf40d0f3e5e9f17574e7b5b3576020b7 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 5 Mar 2024 15:55:57 -0800 Subject: [PATCH 057/114] srrcu: Fix "pairs" ambiguity Signed-off-by: Paul E. McKenney --- src/srrcu.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/srrcu.tex b/src/srrcu.tex index eca211c..aaf0b83 100644 --- a/src/srrcu.tex +++ b/src/srrcu.tex @@ -32,7 +32,8 @@ before $L'$ and $L'$ is sequenced before $U'$. \end{itemize} \begin{note} -This pairs nested locks and unlocks on a given domain in each thread.\end{note} +This associates corresponding locks and unlocks within a nested set +on a given domain in each thread.\end{note} % \pnum A \defn{region of RCU protection} on a domain \tcode{dom} starts From 0bc57ba974998d20a61c3a955834f58ac148bbed Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 5 Mar 2024 15:59:08 -0800 Subject: [PATCH 058/114] srrcu: Use \CppXrefInAccord to generate std refs Signed-off-by: Paul E. McKenney --- src/srrcu.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/srrcu.tex b/src/srrcu.tex index aaf0b83..d3eac1f 100644 --- a/src/srrcu.tex +++ b/src/srrcu.tex @@ -103,7 +103,7 @@ % \pnum A client-supplied template argument \tcode{D} shall be a -function object type \CppXref{20.14} for which, +function object type \CppXrefInAccord{20.14} for which, given a value \tcode{d} of type \tcode{D} and a value \tcode{ptr} of type \tcode{T*}, the expression \tcode{d(ptr)} is valid and has the effect of disposing of the pointer as appropriate for @@ -163,7 +163,7 @@ % @@@ Removed the obsolete reference comments. -This class meets the requirements of \oldconcept{BasicLockable} \CppXref{32.2.5.2} and provides regions of RCU protection. +This class meets the requirements of \oldconcept{BasicLockable} \CppXrefInAccord{32.2.5.2} and provides regions of RCU protection. \begin{example} \begin{codeblock} @@ -200,7 +200,7 @@ % \pnum \remarks Calls to the function lock do not introduce a data race -(\CppXref{6.9.2.1}) involving \tcode{*this}. +(\CppXrefInAccord{6.9.2.1}) involving \tcode{*this}. \end{itemdescr} From 0d744292fc35b5166c61fda746a67823712e6079 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 5 Mar 2024 17:04:43 -0800 Subject: [PATCH 059/114] Approximate ISO front cover Signed-off-by: Paul E. McKenney --- src/ISOlogo.png | Bin 0 -> 4299 bytes src/cover-wd.tex | 67 ++++++++++++++++++++++++++++++++--------------- 2 files changed, 46 insertions(+), 21 deletions(-) create mode 100644 src/ISOlogo.png diff --git a/src/ISOlogo.png b/src/ISOlogo.png new file mode 100644 index 0000000000000000000000000000000000000000..b1b5f1a7c339210a561bd1ef19b6ce3bc453dcc7 GIT binary patch literal 4299 zcmV;+5H#0001WP)t-s;|3G| z|Nr6u0OJ4);{Xr##m4#D+~gJ;=vZ0mX=~_PTK@U@{q*$z{QUUQ((QzWfQ^`7@U(W{ zwb)PRv>3CKN~NZR-EPB%4I4IW*sx*4h7B7wY}l~j2cRf004cxSmw&)WqH3=}kUFhC z{^7Sfwi1Z+xjmP497VRLX?d<`o*hL|T%Y=uPSbC9Q4*x9y&L68XdU-+m{yqNk>CFx zW{4~h$Jb2rk;W89)6{(DPfrj6qz47B??>~9;v&x`(VC^rS1A|IDPL1c!EGF-`uIo92DePcF6yuvSFdN0U|QQY$Q`Ug}2 zfSU}ODk+0*5Pt+V`Ae+dk2lg|@@G|{{U$mixFiFer1!nx7GGq1T+|TwOvLib!>WZ7>6R)QVW1P* zJn9CY?K@%lVI>U;6R~3vJp3|hBl3|@Tp%SvXm|7RM-Z@W=U6{z!FK}M!469<>4U2U z2Kl5A_D9*dBjiQv-0g8C4@EQ!BD|u#Q`*lytG&Bc&#fbYn~)Jr&yAo6|UZ)El6{IboCX z;7*!ed@)+GkD6y{Oo~AFr=q(yeyo|ZMsT}S4IDnfX5eC#U=&^w&ile(scxAWJ;vA9 zAsBEte0|}+G^er%x!=MLUGCKfx=Ve8&A=te=+L)~8`-(V@7mZy(_&bT3s||Wx<*AO zj{ZdWc1eSjaWUu*(Y0Ikr#e=(aJjEbY!go{+*98TAsYn@`XldNH_&?IXYyteo@7C? zLv!-$IMSA9X@*dX3fDgwL3O9#M>h6bbsFe&e@U8os8ykiP~}|71D0CE5nfMRVpfu9 zw(8-vc2vItr{aZf6{aGvJ^DU2h*|t$CI}lV2vIZAcDkx{uGf?-dW@cd{4)sB>(z1E ziaZx#7W}3#8#)s8`z#xvTldiyTY}J%5sh&lF+_@)eny5R5$~)Da~1aGyR1%T*?+r< zyhnVK%-nO~fCfKkay_2$2|9A-gF*T;fRrx&c&T+Drc5p&=?KUas!QX}JiPoZDh+jX z!3bQg;rAjR#U9}{IXHtLKWGfJqsBgZ}TKYCfh#~NVwAI$K~gz z26|$+9G8~^^}8%7`yFBF|P&p6ML<2G@XY9nZ#GArGx+P^!J(58H0|b5JIBjD#Qw zTbVTSavPH1f1Cbz=cL51BnD+$=?|6}JcM)RKtn6UMJ0`NlW@rzF1jrEUAP*hiybxF z(>$8@SL33tu>;*0#@YBHo-<*IQ3=^FZx6Q;u|{m%2yVh?VQq>4E~*@&>#R4#*{xMO z;e`auFiG;96gE(Jo@NWoM?4^H8Ap$PIPt0d>$=qREkp4X_q#GcT6in`X1>LPrLM(DA4f=8P<{kFr>lFjn7!*iL z|JM)%e2L493^?lZuiPV&aHiLifo%PHA-E$0mHqr1b9m3$tRw?h=~a7=DH#MWHR3&$ zw6$d1SGuvkCj+Zxj6v<5=roXCh=dFTFHX#q%!{jT|2)vKl8mSy$77glwyous$t?k# zkb&T}RY&k-*{mXiD!w95io?X%Pfv0FkdeBPL1>;)oIHf>(?k$`r#LQKHc(4)A!Oi? z@IFzisc}nv6UUt;`)*`tIF|=gi!(J-hF%CXU=!E;P$byQ+7VDeXjZ!kO3#+_Aw0ZSA!zj z&=R@S8drw2X#!a3YF_&Wm(2BEP>$tbKyX*g@v)5|FF1#}9Nt|+hP%Ute0QUD?m!D? z6rDR9JmFCUdUi1}1cZt40hQDSo;=>SPdJ;C{ zt3$!6=382exwjQ$1lo-KhFzSDJ{Ut@f+Q>|xnJfdI$2@Y0}2^AlOfXx$xs{IEn9*o>1SP#_{QNPjCCY-GRUS*b%&xj?mxTrLFM z#}{f}){#N-akeRPX1N1*n>mWeD10)mL@G*(%&XxUkFxn|Wbh&uyS)o2NDBUk$S6NX z2D5n~f=5F6A~M1?BO>!tYlc4P)Gx3hR)|0W2({Up6##ouH(ppccxqOvW~jK2|CnkX zhfFtCubiS&AmDx?DrbfR_i>rRniXVd5!okvsWc_34%d;{(QI?z z+DT~1S~zDw4!7>S5ZLs5?<^6Sa{oeRsA#xmu4;RE@}#o|@Ui_rb?9L)px;Um;>O{e%t(bzwb8Ge_A*4jgJsa28K6}lo&XMDFF zN^VP1v8I0^!@y?AX#^>s7^|}bchOk9onttXJBLiwv7|rqyt)T7>iByjCWBhOoyzN= zAmM0>i*VMFfi%9Wr-}KgEVSc#Ju!(^^AkLrI3l!st4VyaZ7rGEBcUKW&$q!SnJ<2L z-=0r02=bHRVhnIa;2e{=S5_i2h#M?)u{Kjg`Jh;tt{Vje!Bfn7X+F~P2;Ok!r}0yx zQg~!|I|S(54T5g;f_OMKM1viR9ny-xK;Q$Ki#w)#=C_9jGNw;rWB1`p+?9^Mn@|B! zgz4?jHLe}22sBDTu4#E<)|H#g$&lM4E)6@RG)-x8zdxK;fIu)cSVP-!?Yeal2@cy~ zES)6yXEJ+o@JfwwCoY%rRQh#6PcZRN52t~_efg-`vkmj#$uO`3fD6|G-HctNzgkPM z_nufXKSky#zT@4{z1W2H%pCa?nY(fmex&j#o(7p$)z16_nY*ltz~g*^?5XenAu`eZ z_9~ehnZlAdSoaw+_DrQJ(2I5w0g{tUOy(10I8}TQsB7AaWPIgyg+MQoDR?y^&|aiP z&2%M88QxANFZuUlV9Qogld6qmVe`AmSiU2wNmigTBqF_D*2qxQP|VSx9|%rU8}r}u)AutB5pt)L^Gly#?Q;BYA~1N;H*6!n0@K|5468Nmso zEH6H`a8)}`k}xE88G~hoVUk3y0g}gGi2HKzBT@lqO`3?@{@D>C4jWmZ-PA3eLcboG z>_o@nQfAG;5d}MzJ8?C#3mHhiY=UlW3qOVjiZAuzzLlTub47JEty$St|L zN$M>xRwWK)Q{fvfI2lgsExO*&C*j2JfN&tKF)s%7aoSqrzY?a+>d zVm+z4NqTk2lGH*#!+$dMBZRK1AXM#b8P*A4b27VtrPU8Iud3lmJr%S zNov!lsU6tWdnV8Cy|`6j>yok|M5@%tTy*l#A-?Jsj|4kMAlcJs7?^ zV-$a6UMQRI0DE5aRi!Hv?W*jk$S>^Ntj1t4?3rFiT~+np?+Ms{@+NvT9s{5!OlSKZ zd>!fX6{*#s>i$lQ*oHgaoQ&-{cffvupOJ7hnJw_D~*^8^8DZi5-2_ z!dSFqY5jM|j9nU;Kg1%~9RlATCf3LO?SiJV`t7&2AZTwcOp@(JJDy2XG)tup*FCfM zA5izjQD?(^IBYJ0HDd5m$t}*vvR|U6s>6no)+4*T;%kjG^ zEO+~q)ST&5dgAMC6)2F>ISd`@2YtCWFDQ(RKa_*PwwW>U(2|&>yI9q--Q3b_8I>{X zybGH0_GTpF#`J&cby}3pxsJa56H|+Qwsly3PwY^|sM)95^hH|xP<0P~j0yqnv6I!) zQn)c|oX15`#G{Qrb?9ujss50FO@Zm`Qp1-m?TaqP^-pLp5eT0)ZQ^Hvnxrt&R{4YS zH3Qi`6kYHAh#$8IRsW#t=>PNPQ)ReqRX;SR3oU{uin{hM*@68Xy(PEzUMTR0-|o|f t4I4IW*sx*4h7B7wY}l}2!-fqK_z#*x47@GSU84X1002ovPDHLkV1i6cMq>Z~ literal 0 HcmV?d00001 diff --git a/src/cover-wd.tex b/src/cover-wd.tex index 12f6009..9e2f96e 100644 --- a/src/cover-wd.tex +++ b/src/cover-wd.tex @@ -4,29 +4,54 @@ \thispagestyle{empty} -\begingroup -\def\hd{\begin{tabular}{ll} - \textbf{Document Number:} & {\larger\docno} \\ - \textbf{Date:} & \reldate \\ - \textbf{Revises:} & \prevdocno \\ - \textbf{Reply to:} & Michael Wong \\ - & Codeplay \\ - & fraggamuffin@gmail.com - \end{tabular} -} -\newlength{\hdwidth} -\settowidth{\hdwidth}{\hd} -\hfill\begin{minipage}{\hdwidth}\hd\end{minipage} -\endgroup +\begin{tabularx}{6.5in}{p{3.5in}|p{3in}} +\resizebox{0.75in}{!}{\includegraphics{ISOlogo.png}} + & \begin{tabular}[t]{l} + ~ \vspace{-0.7in} ~ \\ + \huge \textsf{\textbf{International}} \\ + \huge \textsf{\textbf{Standard}} \\ + ~ \vspace{2in} ~ \\ + \large \textsf{\textbf{\textcolor{red}{ISO SC22 WG21 N4968}}} \\ + \\ + \end{tabular} \\ +\hline +\vspace{0.05in} \large \textbf{C++ Extensions for Concurrency} + & \vspace{0.05in} \large \textsf{\textbf{Second edition}} \\ +\emph{C++ Extensions pour la concurrence} + & \large \textsf{\textbf{2024-03}} \\ +\vspace{5in} (QR Code) + & \\ +\vspace{0.2in} & \\ +\scriptsize \textsf{Reference number} + & \\ +\scriptsize \textsf{ISO NNNN:YYYY(en)} + & \scriptsize \textsf{\textcopyright\ ISO 2024} +\end{tabularx} -\vspace{2.5cm} -\begin{center} -\textbf{\Huge -Programming Languages — Technical specification for \Cpp extensions for concurrency 2 + +% \begingroup +% \def\hd{\begin{tabular}{ll} +% \textbf{Document Number:} & {\larger\docno} \\ +% \textbf{Date:} & \reldate \\ +% \textbf{Revises:} & \prevdocno \\ +% \textbf{Reply to:} & Michael Wong \\ +% & Codeplay \\ +% & fraggamuffin@gmail.com +% \end{tabular} +% } +% \newlength{\hdwidth} +% \settowidth{\hdwidth}{\hd} +% \hfill\begin{minipage}{\hdwidth}\hd\end{minipage} +% \endgroup + +% \vspace{2.5cm} +% \begin{center} +% \textbf{\Huge +% Programming Languages — Technical specification for \Cpp extensions for concurrency 2 %%PDTS, Extensions to \Cpp for Concurrency -} -\end{center} -\vfill +% } +% \end{center} +% \vfill %%\textbf{Note: this is an early draft. It's known to be incomplet and %% incorrekt, and it has lots of %% b\kern-1.2pta\kern1ptd\hspace{1.5em}for\kern-%%3ptmat\kern0.6ptti\raise0.15ex\hbox{n}g.} From 5476e70d549021a737ed472f537bc41657f3e509 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 5 Mar 2024 17:17:28 -0800 Subject: [PATCH 060/114] Approximate ISO back cover Signed-off-by: Paul E. McKenney --- src/backcover.tex | 16 ++++++++++++++++ src/ts.tex | 1 + 2 files changed, 17 insertions(+) create mode 100644 src/backcover.tex diff --git a/src/backcover.tex b/src/backcover.tex new file mode 100644 index 0000000..4846f2c --- /dev/null +++ b/src/backcover.tex @@ -0,0 +1,16 @@ +%!TEX root = ts.tex +%%-------------------------------------------------- +%% Title page for C++ Technical Specification + +\thispagestyle{empty} +\begin{tabularx}{6.5in}{p{3.5in}|p{3in}} +\resizebox{0.75in}{!}{\includegraphics{ISOlogo.png}} + & \vspace{3in} ~ \\ +\hline +\vspace{5in} \textsf{\textbf{ICS NN.NNN.NN}} + & \\ +\scriptsize \textsf{Price based on 21 pages} & \\ + & \\ +\scriptsize \textsf{\textcopyright\ ISO 2024 -- all rights reserved} + & \multicolumn{1}{r}{\large \textsf{\textbf{\textcolor{red}{iso.org}}}} \\ +\end{tabularx} diff --git a/src/ts.tex b/src/ts.tex index ca65a02..faff217 100644 --- a/src/ts.tex +++ b/src/ts.tex @@ -143,4 +143,5 @@ %%-------------------------------------------------- %% End of document +\input{backcover} \end{document} From 045481bff5ba05fcafe8e2615606ca8299cf2b14 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Thu, 7 Mar 2024 13:17:06 -0500 Subject: [PATCH 061/114] Updates from Overleaf --- src/asymmetric.tex | 31 ++++++----- src/general.tex | 35 ++++++------ src/srHP.tex | 134 +++++++++++++++++++++++---------------------- 3 files changed, 104 insertions(+), 96 deletions(-) diff --git a/src/asymmetric.tex b/src/asymmetric.tex index 41ba09e..d71edda 100644 --- a/src/asymmetric.tex +++ b/src/asymmetric.tex @@ -23,31 +23,33 @@ %%\uline{\texttt{\ namespace\ std::experimental::inline\ %%concurrency\_v2\ \{\ \ ~~void*\ %%atomic\_load\_per\_byte\_memcpy(void*\ dest,\ const\ void*\ %%source,\ size\_t\ count,\ memory\_order\ order);\ \ ~~void*\ %%atomic\_store\_per\_byte\_memcpy(void*\ dest,\ const\ void*\ %%source,\ size\_t\ count,\ memory\_order\ order);\ \ ~~\#define\ %%\_\_cpp\_lib\_experimental\_bytewise\_atomic\_memcpy\ \ %%202XYYL\ \}}} %%\rSec1[bytewiseatomicmemcpy.general]{General} -\pnum +%\pnum This subclause introduces synchronization primitives called \defn{heavyweight-fences} and \defn{lightweight-fences}. Like fences, heavyweight-fences and lightweight-fences can have acquire semantics, release semantics, or both, and can be sequentially consistent (in which case they are included in the total order \tcode{S} on \tcode{memory_order::seq_cst} operations). -A heavyweight-fence has all the -synchronization effects of a fence (\CppXref{31.11}). \begin{note} Heavyweight-fences and +A heavyweight-fence shall have all the +synchronization effects of a fence. % (\CppXref{31.11}). +\begin{note} Heavyweight-fences and lightweight-fences are distinct from fences.\end{note} -\pnum +%\pnum A heavyweight-fence with acquire semantics is called an \defn{acquire heavyweight-fence}. A heavyweight-fence with release semantics is called a \defn{release heavyweight-fence}. A lightweight-fence with acquire semantics is called an \defn{acquire lightweight-fence}. A lightweight-fence with release semantics is called a \defn{release lightweight-fence}. -\pnum +%\pnum If there are evaluations A and B, and atomic operations X and Y, both operating on some atomic object M, such that A is sequenced before X, X modifies M, Y is sequenced before B, and Y reads the value written by X or a value written by any side effect in the hypothetical release sequence X would head if it were a release operation, and one of the following hold: -\begin{itemize} +\setenumerate[0]{label=(\alph*)} +\begin{enumerate} \item A is a release lightweight-fence and B is an acquire heavyweight-fence; or \item A is a release heavyweight-fence and B is an acquire lightweight-fence -\end{itemize} +\end{enumerate} then any evaluation sequenced before A strongly happens before any evaluation that B is sequenced before. @@ -61,10 +63,11 @@ \begin{itemdescr} -\pnum +%\pnum \effects Depending on the value of \tcode{order}, this operation: -\begin{itemize} +\setenumerate[0]{label=(\alph*)} +\begin{enumerate} \item has no effects, if \tcode{order == memory\_order::relaxed} is \tcode{true}; \item is an acquire heavyweight-fence, if \tcode{order == memory\_order::acquire} or \tcode{order == memory\_order::consume} is \tcode{true}; @@ -73,7 +76,7 @@ memory_order::acq_rel} is \tcode{true}; \item is a sequentially consistent acquire and release heavyweight-fence, if \tcode{order == memory_order::seq_cst} is \tcode{true}. -\end{itemize} +\end{enumerate} \end{itemdescr} @@ -85,10 +88,12 @@ \begin{itemdescr} -\pnum +%\pnum \effects Depending on the value of \tcode{order}, this operation: -\begin{itemize} +\setenumerate[0]{label=(\alph*)} +\begin{enumerate} + \item has no effects, if \tcode{order == memory\_order::relaxed} is \tcode{true}; \item is an acquire lightweight-fence, if \tcode{order == memory\_order::acquire} or \tcode{order == memory\_order::consume} is \tcode{true}; @@ -97,7 +102,7 @@ memory\_order::acq\_rel} is \tcode{true}; \item is a sequentially consistent acquire and release lightweight-fence, if \tcode{order == memory\_order::seq\_cst} is \tcode{true}. -\end{itemize} +\end{enumerate} \end{itemdescr} diff --git a/src/general.tex b/src/general.tex index 42a8139..e31e618 100644 --- a/src/general.tex +++ b/src/general.tex @@ -2,35 +2,35 @@ \rSec0[scope]{Scope} -\pnum +%\pnum This document describes requirements for implementations of an interface that computer programs written in the C++ programming language could use to invoke algorithms with concurrent execution. The algorithms described by this document are realizable across a broad class of computer architectures. -\pnum +%\pnum This document provides important context and specification for this document. This document is written as a set of changes against that specification. Instructions to modify or add paragraphs are written as explicit instructions. -\pnum +%\pnum Some of the functionality described by this document might be considered for standardization in a future version of C++, but it is not currently part of any C++ standard. Some of the functionality in this document might never be standardized, and other functionality might be standardized in a substantially changed form. -\pnum +%\pnum The goal of this document is to build widespread existing practice for concurrency in the C++ standard algorithms library. It gives advice on extensions to those vendors who wish to provide them. \rSec0[refs]{Normative references} -\pnum -The following referenced document is indispensable for the application of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies. +%\pnum +The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies. \begin{itemize} \item ISO/IEC 14882:2020, \doccite{Programming Languages --- C++} \end{itemize} -\pnum -Unless otherwise specified, the whole of the C++ Standard's Library introduction (\CppXref{16}) is included into this Technical Specification by reference. +%\pnum +%Unless otherwise specified, the whole of the C++ Standard's Library introduction (\CppXref{16}) is included into this Technical Specification by reference. \rSec0[defs]{Terms and definitions} -\pnum +%\pnum \indextext{definitions|(}% No terms and definitions are listed in this document. ISO and IEC maintain terminological databases for use in standardization at the following addresses: @@ -43,13 +43,14 @@ \rSec0[general]{General} \rSec1[general.compliance]{Implementation compliance} -\pnum +%\pnum Conformance requirements for this document are those defined in \CppXref{4.1}, as applied to a merged document consisting of C++20 amended by this document. -\begin{note} -Conformance is defined in terms of the behaviour of programs.\end{note} +%%\begin{note} + +[NOTE: Conformance is defined in terms of the behaviour of programs.]%%\end{note} \rSec1[general.namespaces]{Namespaces and headers and modifications to standard classes} -\pnum +%\pnum Since the extensions described in this document are experimental and not part of the C++ standard library, they are not declared directly within namespace \tcode{std}. Unless otherwise specified, all components described in this document either: \begin{itemize} @@ -58,7 +59,7 @@ \item are declared in a subnamespace of a namespace described in the previous bullet, whose name is not the same as an existing subnamespace of namespace \tcode{std}. \end{itemize} -\pnum +%\pnum Whenever an unqualified name is used in the specification of a declaration \tcode{D}, its meaning is established @@ -72,7 +73,7 @@ \begin{note} Operators in expressions are not so constrained.\end{note} -\pnum +%\pnum Table~\ref{tab:info.headers} shows the headers described in this document %%shall import the contents of %%\tcode{::std::experimental::concurrency::v2} into %%\tcode{::std::experimental::concurrency_v1} as if by: @@ -96,7 +97,7 @@ \end{floattable} \rSec1[general.feature.test]{Feature-testing recommendations } -\pnum +%\pnum An implementation that provides support for this document should define each feature test macro defined in \tref{intro.features1} and \tref{intro.features2} if no associated headers are indicated for that macro, and if associated headers are indicated for a macro, that macro is defined after inclusion of one of the corresponding headers specified in \tref{intro.features1} and \tref{intro.features2}. %%\begin{floattable}{Feature-test macros name}{tab:intro.features} @@ -153,7 +154,7 @@ \end{floattable} % \rSec1[general.plans]{Future plans (Informative)} -% \pnum +% %\pnum % This clause describes tentative plans for future versions of this document and plans for moving content into % future versions of the C++ Standard. diff --git a/src/srHP.tex b/src/srHP.tex index 6c51c6c..68ec7d3 100644 --- a/src/srHP.tex +++ b/src/srHP.tex @@ -4,56 +4,58 @@ \rSec2[saferecl.hp.general]{General} -\pnum +%%\pnum A hazard pointer is a single-writer multi-reader pointer that can be owned by at most one thread at any time. Only the owner of the hazard pointer can set its value, while any number of threads may read its value. The owner thread sets the value of a hazard pointer to point to an object in order to indicate to concurrent threads\textemdash that may delete such an object\textemdash that the object is not yet safe to delete. -\pnum +%\pnum A class type \tcode{T} is \defn{hazard-protectable} if it has exactly one public base class of type \tcode{hazard_pointer_obj_base} for some \tcode{D} and no base classes of type \tcode{hazard_pointer_obj_base} for any other combination \tcode{T’}, \tcode{D’}. An object is \defn{hazard-protectable} if it is of hazard-protectable type. -\pnum +%\pnum The span between creation and destruction of a hazard pointer $h$ is partitioned into a series of \defn{protection epochs}; in each protection epoch, $h$ either is \defn{associated with} a hazard-protectable object, or is \defn{unassociated}. Upon creation, a hazard pointer is unassociated. Changing the association (possibly to the same object) initiates a new protection epoch and ends the preceding one. -\pnum +%\pnum A hazard pointer \defn{belongs to} exactly one \defn{domain}. -\pnum +%\pnum An object of type \tcode{hazard_pointer} is either empty or \defn{owns} a hazard pointer. Each hazard pointer is owned by exactly one object of type \tcode{hazard_pointer}. \begin{note} An empty \tcode{hazard_pointer} object is different from a \tcode{hazard_pointer} object that owns an unassociated hazard pointer. An empty \tcode{hazard_pointer} object does not own any hazard pointers.\end{note} -\pnum +%\pnum An object \tcode{x} of hazard-protectable type \tcode{T} is \defn{retired} to a domain with a deleter of type \tcode{D} when the member function \tcode{hazard_pointer_obj_base::retire} is invoked on \tcode{x}. Any given object \tcode{x} shall be retired at most once. -\pnum +%\pnum A retired object \tcode{x} is \defn{reclaimed} by invoking its deleter with a pointer to \tcode{x}. -\pnum +%\pnum A hazard-protectable object \tcode{x} is \defn{definitely reclaimable} in a domain $dom$ with respect to an evaluation $A$ if: - -\begin{itemize} +\setenumerate[0]{label=(\alph*)} +\begin{enumerate} \item \tcode{x} is not reclaimed, and \item \tcode{x} is retired to $dom$ in an evaluation that happens before $A$, and \item for all hazard pointers $h$ that belong to $dom$, the end of any protection epoch where $h$ is associated with \tcode{x} happens before $A$. -\end{itemize} +\end{enumerate} -\pnum +%\pnum A hazard-protectable object \tcode{x} is \defn{possibly reclaimable} in domain $dom$ with respect to an evaluation $A$ if: -\begin{itemize} +\setenumerate[0]{label=(\alph*)} +\begin{enumerate} \item \tcode{x} is not reclaimed; and \item \tcode{x} is retired to $dom$ in an evaluation $R$ and $A$ does not happen before $R$; and \item for all hazard pointers $h$ that belong to $dom$, $A$ does not happen before the end of any protection epoch where $h$ is associated with \tcode{x}; and \item for all hazard pointers $h$ belonging to $dom$ and for every protection epoch $E$ of $h$ during which $h$ is associated with \tcode{x}: -\begin{itemize} +\setenumerate[0]{label=(\arabic*)} +\begin{enumerate} \item $A$ does not happen before the end of $E$, and \item if the beginning of $E$ happens before \tcode{x} is retired, the end of $E$ strongly happens before $A$, and \item if $E$ began by an evaluation of \tcode{try_protect} with argument \tcode{src}, label its atomic load operation $L$. If there exists an atomic modification $B$ on \tcode{src} such that $L$ observes a modification that is modification-ordered before $B$, and $B$ happens before \tcode{x} is retired, the end of $E$ strongly happens before $A$. \begin{note} In typical use, a store to \tcode{src} sequenced before retiring \tcode{x} will be such an atomic operation $B$.\end{note} -\end{itemize} -\begin{note} The latter two conditions convey the informal notion that a protection epoch that began before retiring \tcode{x}, as implied either by the happens-before relation or the coherence order of some source, delays the reclamation of \tcode{x}.\end{note} -\end{itemize} +\end{enumerate} +\begin{note} Condition d(2) and d(3) convey the informal notion that a protection epoch that began before retiring \tcode{x}, as implied either by the happens-before relation or the coherence order of some source, delays the reclamation of \tcode{x}.\end{note} +\end{enumerate} \begin{example} The following example shows how hazard pointers allow updates to be carried out in the presence of concurrent readers. The object of type \tcode{hazard_pointer} in \tcode{print_name} protects the object \tcode{*ptr} from being reclaimed by \tcode{ptr->retire} until the end of the protection epoch. @@ -109,15 +111,15 @@ \rSec3[saferecl.hp.domain.general]{General} -\pnum +%\pnum The number of unreclaimed possibly-reclaimable objects retired to a domain is bounded. The bound is implementation-defined. \begin{note} The bound can be independent of other domains and can be a function of the number of hazard pointers belonging to the domain, the number of threads that retire objects to the domain, and the number of threads that use hazard pointers belonging to the domain.\end{note} -\pnum -Concurrent access to a domain does not incur a data race (\CppXref{6.9.2.1}). +%\pnum +Concurrent access to a domain does not incur a data race. %(\CppXref{6.9.2.1}). \begin{codeblock} class hazard_pointer_domain { @@ -140,19 +142,19 @@ \begin{itemdescr} -\pnum +%\pnum \effects Equivalent to \tcode{hazard_pointer_domain(\{\})}. \end{itemdescr} \begin{itemdecl} -explicit hazard_pointer_domain(pmr::polymorphic_allocator poly_alloc) noexcept;} +explicit hazard_pointer_domain(pmr::polymorphic_allocator poly_alloc) noexcept; \end{itemdecl} \begin{itemdescr} -\pnum +%\pnum \remarks All allocation and deallocation related to hazard pointers belonging to this domain use a copy of \tcode{poly_alloc}. @@ -165,11 +167,11 @@ \begin{itemdescr} -\pnum +%\pnum \expects All hazard pointers belonging to \tcode{*this} have been destroyed. -\pnum +%\pnum \effects Reclaims all objects retired to this domain that have not yet been reclaimed. @@ -183,11 +185,11 @@ \begin{itemdescr} -\pnum +%\pnum \returns A reference to the default \tcode{hazard_pointer_domain}. -\pnum +%\pnum \remarks The default domain has an unspecified allocator and has static storage duration. The initialization of the default domain strongly happens before this function @@ -204,15 +206,15 @@ \begin{itemdescr} -\pnum +%\pnum \effects May reclaim possibly-reclaimable objects retired to \tcode{domain}. -\pnum +%\pnum \ensures All definitely-reclaimable objects retired to \tcode{domain} have been reclaimed. -\pnum +%\pnum \sync The completion of the deleter for each reclaimed object synchronizes with the return from this function call. @@ -235,17 +237,17 @@ }; \end{codeblock} -\pnum -A client-supplied template argument \tcode{D} shall be a function object type (\CppXref{20.14}) +%\pnum +A client-supplied template argument \tcode{D} shall be a function object type %(\CppXref{20.14}) for which, given a value \tcode{d} of type \tcode{D} and a value \tcode{ptr} of type \tcode{T*}, the expression \tcode{d(ptr)} is valid and has the effect of disposing of the pointer as appropriate for that deleter. -\pnum +%\pnum The behaviour of a program that adds specializations for \tcode{hazard_pointer_obj_base} is undefined. -\pnum +%\pnum \tcode{D} shall meet the requirements for \oldconcept{DefaultConstructible} and \oldconcept{MoveAssignable}. -\pnum +%\pnum \tcode{T} may be an incomplete type. \begin{itemdecl} @@ -254,21 +256,21 @@ \begin{itemdescr} -\pnum +%\pnum \mandates \tcode{T} is a hazard-protectable type. -\pnum +%\pnum \expects \tcode{*this} is a base class subobject of an object \tcode{x} of type \tcode{T}. \tcode{x} is not retired. Move-assigning \tcode{D} from \tcode{d} does not throw an exception. The expression \tcode{d(addressof(x))} has well-defined behaviour and does not throw an exception. -\pnum +%\pnum \effects Move-assigns \tcode{d} to \exposid{deleter}, thereby setting it as the deleter of \tcode{x}, then retires \tcode{x} to \tcode{domain}. -\pnum +%\pnum Invoking the retire function may reclaim possibly-reclaimable objects retired to \tcode{domain}. \end{itemdescr} @@ -279,7 +281,7 @@ \begin{itemdescr} -\pnum +%\pnum \effects Equivalent to \tcode{retire(D(), domain)}. @@ -314,7 +316,7 @@ \begin{itemdescr} -\pnum +%\pnum \ensures \tcode{*this} is empty. @@ -326,7 +328,7 @@ \begin{itemdescr} -\pnum +%\pnum \ensures If \tcode{other} is empty, \tcode{*this} is empty. Otherwise, \tcode{*this} owns the hazard pointer originally owned by \tcode{other}; \tcode{other} is empty. @@ -340,7 +342,7 @@ \begin{itemdescr} -\pnum +%\pnum \effects If \tcode{*this} is not empty, destroys the hazard pointer owned by \tcode{*this}, thereby ending its current protection epoch. @@ -354,17 +356,17 @@ \begin{itemdescr} -\pnum +%\pnum \effects If \tcode{this == \&other} is true, no effect. Otherwise, if \tcode{*this} is not empty, destroys the hazard pointer owned by \tcode{*this}, thereby ending its current protection epoch. -\pnum +%\pnum \ensures If \tcode{other} was empty, \tcode{*this} is empty. Otherwise, \tcode{*this} owns the hazard pointer originally owned by other. If \tcode{this != \&other} is true, \tcode{other} is empty. -\pnum +%\pnum \returns \tcode{*this}. @@ -378,7 +380,7 @@ \begin{itemdescr} -\pnum +%\pnum \returns \tcode{true} if and only if \tcode{*this} is empty. @@ -391,7 +393,7 @@ \begin{itemdescr} -\pnum +%\pnum \effects Equivalent to \begin{codeblock} @@ -408,28 +410,28 @@ \begin{itemdescr} -\pnum +%\pnum \mandates \tcode{T} is a hazard-protectable type. -\pnum +%\pnum \expects \tcode{*this} is not empty. -\pnum +%\pnum \effects -\begin{itemize} +\begin{enumerate} \item Initializes a variable \tcode{old} of type \tcode{T*} with the value of \tcode{ptr}. \item Evaluates the function call \tcode{reset_protection(old)}. \item Assigns the value of \tcode{src.load(std::memory_order_acquire)} to \tcode{ptr}. \item If \tcode{old == ptr} is false, evaluates the function call \tcode{reset_protection()}. -\end{itemize} +\end{enumerate} -\pnum +%\pnum \returns \tcode{old == ptr}. \begin{note} It is possible for \tcode{try_protect} to return \tcode{true} when \tcode{ptr} is a null pointer.\end{note} -\pnum +%\pnum \complexity Constant. @@ -441,15 +443,15 @@ \begin{itemdescr} -\pnum +%\pnum \mandates \tcode{T} is a hazard-protectable type. -\pnum +%\pnum \defn{Preconditions}: \tcode{*this} is not empty. -\pnum +%\pnum \effects If \tcode{ptr} is a null pointer value, invokes \tcode{reset_protection()}. Otherwise, associates the hazard pointer owned by \tcode{*this} with \tcode{*ptr}, thereby ending the current protection epoch. @@ -461,11 +463,11 @@ \begin{itemdescr} -\pnum +%\pnum \expects \tcode{*this} is not empty. -\pnum +%\pnum \ensures The hazard pointer owned by \tcode{*this} is unassociated. @@ -477,11 +479,11 @@ \begin{itemdescr} -\pnum +%\pnum \effects Swaps the hazard pointer ownership of this object with that of other. \begin{note} The owned hazard pointers, if any, remain unchanged during the swap and continue to be associated with the respective objects that they were protecting before the swap, if any. No protection epochs are ended or initiated.\end{note} -\pnum +%\pnum \complexity Constant. @@ -496,15 +498,15 @@ \begin{itemdescr} -\pnum +%\pnum \effects Constructs a hazard pointer belonging to \tcode{domain}. -\pnum +%\pnum \returns A \tcode{hazard_pointer} object that owns the newly-constructed hazard pointer. -\pnum +%\pnum \throws Any exception thrown by the allocator of \tcode{domain}. @@ -518,7 +520,7 @@ \begin{itemdescr} -\pnum +%\pnum \effects Equivalent to \tcode{a.swap(b)}. From 2a83aa160ddebb4cf5103f6b6024a5410b0766ec Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Thu, 7 Mar 2024 16:19:09 -0800 Subject: [PATCH 062/114] foreword: Update to new ISO version Signed-off-by: Paul E. McKenney --- src/foreword.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/foreword.tex b/src/foreword.tex index 3266ad1..68479ea 100644 --- a/src/foreword.tex +++ b/src/foreword.tex @@ -4,14 +4,14 @@ ISO (the International Organization for Standardization) and IEC (the International Electrotechnical Commission) form the specialized system for worldwide standardization. National bodies that are members of ISO or IEC participate in the development of International Standards through technical committees established by the respective organization to deal with particular fields of technical activity. ISO and IEC technical committees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the work. -The procedures used to develop this document and those intended for its further maintenance are described in the ISO/IEC Directives, Part 1. In particular the different approval criteria needed for the different types of document should be noted. This document was drafted in accordance with the editorial rules of the ISO/IEC Directives, Part 2 (see www.iso.org/directives). +The procedures used to develop this document and those intended for its further maintenance are described in the ISO/IEC Directives, Part 1. In particular, the different approval criteria needed for the different types of document should be noted. This document was drafted in accordance with the editorial rules of the ISO/IEC Directives, Part 2 (see \url{www.iso.org/directives} or \url{www.iec.ch/members_experts/refdocs}). -Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. ISO and IEC shall not be held responsible for identifying any or all such patent rights. Details of any patent rights identified during the development of the document will be in the Introduction and/or on the ISO list of patent declarations received (see www.iso.org/patents) or the IEC list of patent declarations received (see http://patents.iec.ch). +ISO and IEC draw attention to the possibility that the implementation of this document may involve the use of (a) patent(s). ISO and IEC take no position concerning the evidence, validity or applicability of any claimed patent rights in respect thereof. As of the date of publication of this document, ISO and IEC had not received notice of (a) patent(s) which may be required to implement this document. However, implementers are cautioned that this may not represent the latest information, which may be obtained from the patent database available at \url{www.iso.org/patents} and \url{https://patents.iec.ch}. ISO and IEC shall not be held responsible for identifying any or all such patent rights. Any trade name used in this document is information given for the convenience of users and does not constitute an endorsement. -For an explanation on the voluntary nature of standards, the meaning of ISO specific terms and expressions related to conformity assessment, as well as information about ISO’s adherence to the World Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT), see www.iso.org/iso/foreword.html. +For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and expressions related to conformity assessment, as well as information about ISO's adherence to the World Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT) see \url{www.iso.org/iso/foreword.html}. In the IEC, see \url{www.iec.ch/understanding-standards}. -This document was prepared by Joint Technical Committee ISO/IEC JTC 1, \textit{Information technology}, Subcommittee SC 22, \textit{Programming languages, their environments and system software interfaces}. +This document was prepared by Joint Technical Committee ISO/IEC JTC 1, \emph{Information technology}, Subcommittee SC 22, \emph{Programming languages}, their environments and system software interfaces. -Any feedback or questions on this document should be directed to the user’s national standards body. A complete listing of these bodies can be found at www.iso.org/members.html. \ No newline at end of file +Any feedback or questions on this document should be directed to the user’s national standards body. A complete listing of these bodies can be found at \url{www.iso.org/members.html} and \url{www.iec.ch/national-committees}. From 535ce06066c540e8a1a62d21ceb006b935e49f6a Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 8 Mar 2024 09:32:31 -0800 Subject: [PATCH 063/114] Remove QR code from cover page Signed-off-by: Paul E. McKenney --- src/cover-wd.tex | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/cover-wd.tex b/src/cover-wd.tex index 9e2f96e..5c1f206 100644 --- a/src/cover-wd.tex +++ b/src/cover-wd.tex @@ -19,9 +19,7 @@ & \vspace{0.05in} \large \textsf{\textbf{Second edition}} \\ \emph{C++ Extensions pour la concurrence} & \large \textsf{\textbf{2024-03}} \\ -\vspace{5in} (QR Code) - & \\ -\vspace{0.2in} & \\ +\vspace{5.2in} ~ & \\ \scriptsize \textsf{Reference number} & \\ \scriptsize \textsf{ISO NNNN:YYYY(en)} From fb64b9cca34aae34ecc1d6fbbf2d4c20d8cd2522 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 8 Mar 2024 09:37:27 -0800 Subject: [PATCH 064/114] global: Comment out "\pnum" Signed-off-by: Paul E. McKenney --- src/order.tex | 2 +- src/syncvalue.tex | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/order.tex b/src/order.tex index 71725dd..ca27e4c 100644 --- a/src/order.tex +++ b/src/order.tex @@ -24,7 +24,7 @@ following requirements: \begin{quote} %%\setcounter{Paras}{3} -\pnum +% \pnum \begin{itemize} \item ... diff --git a/src/syncvalue.tex b/src/syncvalue.tex index 1b928f5..69410e7 100644 --- a/src/syncvalue.tex +++ b/src/syncvalue.tex @@ -55,7 +55,7 @@ \end{codeblock} %%\usepackage{enumitem} -\pnum +% \pnum An object of type \tcode{synchronized_value} wraps an object of type \tcode{T}. The wrapped object can be accessed by passing a callable object or function to \tcode{apply}. All such @@ -76,7 +76,7 @@ \begin{itemdescr} %%\tightlist %%\item[] -\pnum +% \pnum \constraints \begin{itemize} \item @@ -88,12 +88,12 @@ \tcode{true} \end{itemize} %%\end{itemdescr} -\pnum +% \pnum \effects Direct-non-list-initializes \emph{\tcode{value}} with \tcode{std::forward(args)...}. -\pnum +% \pnum \throws Any exceptions emitted by the initialization of \emph{\tcode{value}}.\\ \tcode{system_error} if any necessary resources cannot be acquired. @@ -116,11 +116,11 @@ %%\end{itemdescr} -\pnum +% \pnum \constraints \tcode{sizeof...(values) != 0} is \tcode{true}. -\pnum +% \pnum \effects Equivalent to: From 7987edab5bf15a60963a5a4022e786b6d257e80d Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 8 Mar 2024 09:46:36 -0800 Subject: [PATCH 065/114] syncvalue: Fix EXAMPLE Signed-off-by: Paul E. McKenney --- src/syncvalue.tex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/syncvalue.tex b/src/syncvalue.tex index 69410e7..17a6d13 100644 --- a/src/syncvalue.tex +++ b/src/syncvalue.tex @@ -131,14 +131,15 @@ \begin{note} It is not possible to pass a single instance of \tcode{synchronized_value} more than once to the same invocation of \tcode{apply}. -\begin{example} + +EXAMPLE \begin{codeblock} synchronized_value sv; void f(int,int); apply(f,sv,sv); // undefined behaviour, sv passed more than once to same call \end{codeblock} -\end{example}\end{note} +\end{note} \begin{note} The invocation of \tcode{f} can not call \tcode{apply} directly or indirectly passing any of \tcode{values...}.\end{note} From 73d86d3ff2585e983286605ef0a33e3cf6c0a9df Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 8 Mar 2024 09:49:53 -0800 Subject: [PATCH 066/114] global: Remove "[]" from EXAMPLE and NOTE Signed-off-by: Paul E. McKenney --- src/macros.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/macros.tex b/src/macros.tex index 7aceb7c..eafb519 100644 --- a/src/macros.tex +++ b/src/macros.tex @@ -280,7 +280,7 @@ \newcommand{\leftshift}[1]{\ensuremath{\mathbin{\mathsf{lshift}_{#1}}}} %% Notes and examples -\newcommand{\noteintro}[1]{[#1:} +\newcommand{\noteintro}[1]{#1:} \newcommand{\noteoutro}[1]{\,---\,#1\kern.5pt]} % \newnoteenvironment{ENVIRON}{BEGIN TEXT}{END TEXT} @@ -293,7 +293,7 @@ \newsubclausecounter{#1} \newenvironment{tail#1} {\par\small\stepcounter{#1}\noteintro{#2}} -{]} +{} \newenvironment{#1} {\begin{tail#1}} {\end{tail#1}\small\par} % \small\par is for C++20 post-DIS compatibility From aeb88fb6402dd0405fcc001f480df8a248a02798 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 8 Mar 2024 09:53:28 -0800 Subject: [PATCH 067/114] srHP: Fix singleton NOTEs Signed-off-by: Paul E. McKenney --- src/srHP.tex | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/srHP.tex b/src/srHP.tex index 68ec7d3..b3846bf 100644 --- a/src/srHP.tex +++ b/src/srHP.tex @@ -113,10 +113,12 @@ %\pnum The number of unreclaimed possibly-reclaimable objects retired to a domain is bounded. -The bound is implementation-defined. \begin{note} The bound can be independent of other +The bound is implementation-defined. + +NOTE The bound can be independent of other domains and can be a function of the number of hazard pointers belonging to the domain, the number of threads that retire objects to the domain, and the number of -threads that use hazard pointers belonging to the domain.\end{note} +threads that use hazard pointers belonging to the domain. %\pnum Concurrent access to a domain does not incur a data race. %(\CppXref{6.9.2.1}). @@ -429,7 +431,7 @@ %\pnum \returns -\tcode{old == ptr}. \begin{note} It is possible for \tcode{try_protect} to return \tcode{true} when \tcode{ptr} is a null pointer.\end{note} +\tcode{old == ptr}. NOTE It is possible for \tcode{try_protect} to return \tcode{true} when \tcode{ptr} is a null pointer. %\pnum \complexity @@ -481,7 +483,7 @@ %\pnum \effects -Swaps the hazard pointer ownership of this object with that of other. \begin{note} The owned hazard pointers, if any, remain unchanged during the swap and continue to be associated with the respective objects that they were protecting before the swap, if any. No protection epochs are ended or initiated.\end{note} +Swaps the hazard pointer ownership of this object with that of other. NOTE The owned hazard pointers, if any, remain unchanged during the swap and continue to be associated with the respective objects that they were protecting before the swap, if any. No protection epochs are ended or initiated. %\pnum \complexity From 9137bee694cd795c3d8dd149cff1345599206c29 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 8 Mar 2024 09:55:30 -0800 Subject: [PATCH 068/114] srrcu: Fix singleton NOTEs Signed-off-by: Paul E. McKenney --- src/srrcu.tex | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/srrcu.tex b/src/srrcu.tex index d3eac1f..45546d0 100644 --- a/src/srrcu.tex +++ b/src/srrcu.tex @@ -31,9 +31,10 @@ \tcode{lock} $L'$ on \tcode{dom} such that $L$ is sequenced before $L'$ and $L'$ is sequenced before $U'$. \end{itemize} -\begin{note} + +NOTE This associates corresponding locks and unlocks within a nested set -on a given domain in each thread.\end{note} +on a given domain in each thread. % \pnum A \defn{region of RCU protection} on a domain \tcode{dom} starts @@ -153,9 +154,10 @@ It is implementation-defined whether or not scheduled evaluations in \tcode{dom} can be invoked by the \tcode{retire} function. -\begin{note} + +NOTE If such evaluations acquire resources held across any invocation of -retire on \tcode{dom}, deadlock can occur.\end{note} +retire on \tcode{dom}, deadlock can occur. \end{itemdescr} From 2257b71c58e54b244568ea0e925ec8968531918f Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 8 Mar 2024 09:57:10 -0800 Subject: [PATCH 069/114] asymmetric: Fix singleton NOTEs Signed-off-by: Paul E. McKenney --- src/asymmetric.tex | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/asymmetric.tex b/src/asymmetric.tex index d71edda..c6e5910 100644 --- a/src/asymmetric.tex +++ b/src/asymmetric.tex @@ -31,8 +31,10 @@ are included in the total order \tcode{S} on \tcode{memory_order::seq_cst} operations). A heavyweight-fence shall have all the synchronization effects of a fence. % (\CppXref{31.11}). -\begin{note} Heavyweight-fences and -lightweight-fences are distinct from fences.\end{note} + +NOTE +Heavyweight-fences and +lightweight-fences are distinct from fences. %\pnum A heavyweight-fence with acquire semantics is called an \defn{acquire heavyweight-fence}. A @@ -108,11 +110,11 @@ -\begin{note} Delegating both heavyweight-fence and lightweight-fence functions to an +NOTE Delegating both heavyweight-fence and lightweight-fence functions to an \tcode{atomic_thread_fence(order)} call is a valid implementation. Implementations can adopt techniques in which calls to \tcode{asymmetric_thread_fence_light} execute more quickly than calls to \tcode{atomic_thread_fence} with the same \tcode{memory_order}, at the cost of \tcode{asymmetric_thread_fence_heavy} executing more slowly than calls to -\tcode{atomic_thread_fence} with the same \tcode{memory_order}\end{note} +\tcode{atomic_thread_fence} with the same \tcode{memory_order}. From 0c71d7f8322a772389871489afcb9d40694b561d Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 8 Mar 2024 10:02:18 -0800 Subject: [PATCH 070/114] srHP: Fix singleton EXAMPLE Signed-off-by: Paul E. McKenney --- src/srHP.tex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/srHP.tex b/src/srHP.tex index b3846bf..555c452 100644 --- a/src/srHP.tex +++ b/src/srHP.tex @@ -57,7 +57,7 @@ \begin{note} Condition d(2) and d(3) convey the informal notion that a protection epoch that began before retiring \tcode{x}, as implied either by the happens-before relation or the coherence order of some source, delays the reclamation of \tcode{x}.\end{note} \end{enumerate} -\begin{example} The following example shows how hazard pointers allow updates to be carried out in the presence of concurrent readers. The object of type \tcode{hazard_pointer} in \tcode{print_name} protects the object \tcode{*ptr} from being reclaimed by \tcode{ptr->retire} until the end of the protection epoch. +EXAMPLE The following example shows how hazard pointers allow updates to be carried out in the presence of concurrent readers. The object of type \tcode{hazard_pointer} in \tcode{print_name} protects the object \tcode{*ptr} from being reclaimed by \tcode{ptr->retire} until the end of the protection epoch. \begin{codeblock} struct Name : public hazard_pointer_obj_base { /* details */ }; @@ -76,7 +76,6 @@ ptr->retire(); } \end{codeblock} -\end{example} \rSec2[saferecl.hp.syn]{Header \tcode{} synopsis} From b5ba8681645ab242ec4530b60e742c6a83ee65f3 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 8 Mar 2024 10:04:16 -0800 Subject: [PATCH 071/114] srrcu: Fix singleton EXAMPLE Signed-off-by: Paul E. McKenney --- src/srrcu.tex | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/srrcu.tex b/src/srrcu.tex index 45546d0..f450297 100644 --- a/src/srrcu.tex +++ b/src/srrcu.tex @@ -167,12 +167,6 @@ This class meets the requirements of \oldconcept{BasicLockable} \CppXrefInAccord{32.2.5.2} and provides regions of RCU protection. -\begin{example} -\begin{codeblock} -std::scoped_lock rlock(rcu_default_domain()); -\end{codeblock} -\end{example} - \begin{codeblock} class rcu_domain { public: @@ -187,6 +181,11 @@ The functions \tcode{lock} and \tcode{unlock} establish (possibly nested) regions of RCU protection. +EXAMPLE +\begin{codeblock} +std::scoped_lock rlock(rcu_default_domain()); +\end{codeblock} + \rSec3[saferecl.rcu.domain.lock]{\tcode{rcu_domain::lock}} \begin{itemdecl} From bf101a2dfe5b965f4092e0ea8830504a88fcdd64 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Tue, 12 Mar 2024 00:04:37 -0400 Subject: [PATCH 072/114] Update front cover Reference number --- src/cover-wd.tex | 4 ++-- src/general.tex | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cover-wd.tex b/src/cover-wd.tex index 5c1f206..9e79b90 100644 --- a/src/cover-wd.tex +++ b/src/cover-wd.tex @@ -22,8 +22,8 @@ \vspace{5.2in} ~ & \\ \scriptsize \textsf{Reference number} & \\ -\scriptsize \textsf{ISO NNNN:YYYY(en)} - & \scriptsize \textsf{\textcopyright\ ISO 2024} +\scriptsize \textsf{ISO 9922:2023(en)} + & \scriptsize \textsf{\textcopyright\ ISO 2023} \end{tabularx} diff --git a/src/general.tex b/src/general.tex index e31e618..318b0f0 100644 --- a/src/general.tex +++ b/src/general.tex @@ -47,7 +47,7 @@ Conformance requirements for this document are those defined in \CppXref{4.1}, as applied to a merged document consisting of C++20 amended by this document. %%\begin{note} -[NOTE: Conformance is defined in terms of the behaviour of programs.]%%\end{note} +NOTE: Conformance is defined in terms of the behaviour of programs.%%\end{note} \rSec1[general.namespaces]{Namespaces and headers and modifications to standard classes} %\pnum From a980054e651cf671d3f5a3fc2299e469b2bde862 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 12 Mar 2024 14:03:30 -0700 Subject: [PATCH 073/114] foreword: Italicize full subcommittee name Reported by: NELSON Isabel Veronica Signed-off-by: Paul E. McKenney --- src/foreword.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/foreword.tex b/src/foreword.tex index 68479ea..39978d1 100644 --- a/src/foreword.tex +++ b/src/foreword.tex @@ -12,6 +12,6 @@ For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and expressions related to conformity assessment, as well as information about ISO's adherence to the World Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT) see \url{www.iso.org/iso/foreword.html}. In the IEC, see \url{www.iec.ch/understanding-standards}. -This document was prepared by Joint Technical Committee ISO/IEC JTC 1, \emph{Information technology}, Subcommittee SC 22, \emph{Programming languages}, their environments and system software interfaces. +This document was prepared by Joint Technical Committee ISO/IEC JTC 1, \emph{Information technology}, Subcommittee SC 22, \emph{Programming languages, their environments and system software interfaces}. Any feedback or questions on this document should be directed to the user’s national standards body. A complete listing of these bodies can be found at \url{www.iso.org/members.html} and \url{www.iec.ch/national-committees}. From a4720c1577f8adc71bf0cf2b9f69c6c1e28d4399 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 12 Mar 2024 14:07:29 -0700 Subject: [PATCH 074/114] Update header/footer year to 2024 Reported-by: Reported by: NELSON Isabel Veronica Signed-off-by: Paul E. McKenney --- src/config.tex | 4 ++-- src/styles.tex | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/config.tex b/src/config.tex index 7b9dbb7..e0bbc3f 100644 --- a/src/config.tex +++ b/src/config.tex @@ -2,7 +2,7 @@ %%-------------------------------------------------- %% Version numbers \newcommand{\docno}{N4968} -\newcommand{\isodocno}{ISO/IEC DTS 9922:2023(E)} +\newcommand{\isodocno}{ISO/IEC DTS 9922:2024(E)} \newcommand{\prevdocno}{N4895;N4953;N4956} \newcommand{\cppver}{201703L @@@} %% MW: need update \newcommand{\tsver}{202306} @@ -18,7 +18,7 @@ \newcommand{\reldate}{\today} \newcommand{\copyrightyear}{2023} -\newcommand{\cppstddocno}{ISO/IEC DTS 9922:2023(E)} +\newcommand{\cppstddocno}{ISO/IEC DTS 9922:2024(E)} %% Library chapters diff --git a/src/styles.tex b/src/styles.tex index 9095839..acf0cee 100644 --- a/src/styles.tex +++ b/src/styles.tex @@ -21,10 +21,10 @@ %% create page styles \makepagestyle{cpppage} -\makeevenhead{cpppage}{\textsc{ISO/IEC DTS 9922:2023(E)}}{}{\textbf{\docno}} -\makeoddhead{cpppage}{\textsc{ISO/IEC DTS 9922:2023(E)}}{}{\textbf{\docno}} -\makeevenfoot{cpppage}{\leftmark}{© ISO/IEC 2023 – All rights reserved}{\thepage} -\makeoddfoot{cpppage}{\leftmark}{© ISO/IEC 2023 – All rights reserved}{\thepage} +\makeevenhead{cpppage}{\textsc{ISO/IEC DTS 9922:2024(E)}}{}{\textbf{\docno}} +\makeoddhead{cpppage}{\textsc{ISO/IEC DTS 9922:2024(E)}}{}{\textbf{\docno}} +\makeevenfoot{cpppage}{\leftmark}{© ISO/IEC 2024 – All rights reserved}{\thepage} +\makeoddfoot{cpppage}{\leftmark}{© ISO/IEC 2024 – All rights reserved}{\thepage} \makeatletter \makepsmarks{cpppage}{% From 6570714f2b328ae3fe6be4b668409eb1dc40ab30 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Thu, 4 Apr 2024 12:46:00 -0400 Subject: [PATCH 075/114] add readme from Maged, aslso last changes from Isabel except Cambria font. --- README.md | 1 + src/cover-wd.tex | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7abb482..64853ac 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ will generate a PDF. \textbf{October 2023 pre-Kona Plenary meeting} N4968 is the replaced PDTS of Concurrency TS V2. It contains changes directed by ISO to remove colour changes and replace with explicit change annotations. +\textbf{Mark 2024 post-Tokyo Plenary meeting} N4968 is the replaced PDTS of Concurrency TS V2. It contains changes directed by ISO. The changes include removing paragraph numbers, including item numbers where appropriate, changing internal reference to item number instead of paragraph numbers, updating the font and numbering for notes and examples, and making references normative. \textbf{August 2023 post-Varna Plenary meeting} N4956 is the proposed PDTS of Concurrency TS Version 2. diff --git a/src/cover-wd.tex b/src/cover-wd.tex index 9e79b90..d608328 100644 --- a/src/cover-wd.tex +++ b/src/cover-wd.tex @@ -22,8 +22,8 @@ \vspace{5.2in} ~ & \\ \scriptsize \textsf{Reference number} & \\ -\scriptsize \textsf{ISO 9922:2023(en)} - & \scriptsize \textsf{\textcopyright\ ISO 2023} +\scriptsize \textsf{ISO 9922:2024(en)} + & \scriptsize \textsf{\textcopyright\ ISO 2024} \end{tabularx} From 6d23c0980537cb450be33fda98de42479513d01d Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Fri, 5 Apr 2024 13:02:54 -0400 Subject: [PATCH 076/114] =?UTF-8?q?update=20the=20title=20to=20Programming?= =?UTF-8?q?=20Languages=20=E2=80=94=20Technical=20specification=20for=20?= =?UTF-8?q?=20...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cover-wd.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cover-wd.tex b/src/cover-wd.tex index d608328..2f86cc0 100644 --- a/src/cover-wd.tex +++ b/src/cover-wd.tex @@ -15,7 +15,7 @@ \\ \end{tabular} \\ \hline -\vspace{0.05in} \large \textbf{C++ Extensions for Concurrency} +\vspace{0.05in} \large \textbf{Programming Languages — Technical specification for C++ Extensions for Concurrency 2} & \vspace{0.05in} \large \textsf{\textbf{Second edition}} \\ \emph{C++ Extensions pour la concurrence} & \large \textsf{\textbf{2024-03}} \\ From 467ef98a115d7758621a75c715d08e32bf3e8a0e Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 14 Jun 2024 09:53:44 -0700 Subject: [PATCH 077/114] general: Replace "C++ Standard" with "ISO/IEC 14882:2020" Signed-off-by: Paul E. McKenney --- src/general.tex | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/general.tex b/src/general.tex index 318b0f0..7a3fd5f 100644 --- a/src/general.tex +++ b/src/general.tex @@ -11,10 +11,10 @@ explicit instructions. %\pnum -Some of the functionality described by this document might be considered for standardization in a future version of C++, but it is not currently part of any C++ standard. Some of the functionality in this document might never be standardized, and other functionality might be standardized in a substantially changed form. +Some of the functionality described by this document might be considered for standardization in a future version of C++, but it is not currently part of ISO/IEC 14882:2020. Some of the functionality in this document might never be standardized, and other functionality might be standardized in a substantially changed form. %\pnum -The goal of this document is to build widespread existing practice for concurrency in the C++ standard algorithms library. It gives advice on extensions to those vendors who wish to provide them. +The goal of this document is to build widespread existing practice for concurrency in the ISO/IEC 14882:2020 algorithms library. It gives advice on extensions to those vendors who wish to provide them. \rSec0[refs]{Normative references} @@ -26,7 +26,7 @@ \end{itemize} %\pnum -%Unless otherwise specified, the whole of the C++ Standard's Library introduction (\CppXref{16}) is included into this Technical Specification by reference. +%Unless otherwise specified, the whole of the ISO/IEC 14882:2020 library introduction (\CppXref{16}) is included into this Technical Specification by reference. \rSec0[defs]{Terms and definitions} @@ -51,11 +51,11 @@ \rSec1[general.namespaces]{Namespaces and headers and modifications to standard classes} %\pnum -Since the extensions described in this document are experimental and not part of the C++ standard library, they are not declared directly within namespace \tcode{std}. Unless otherwise specified, all components described in this document either: +Since the extensions described in this document are experimental and not part of the ISO/IEC 14882:2020 library, they are not declared directly within namespace \tcode{std}. Unless otherwise specified, all components described in this document either: \begin{itemize} - \item modify an existing interface in the C++ Standard Library in-place, - \item are declared in a namespace whose name appends \tcode{::experimental::concurrency\_v2} to a namespace defined in the C++ Standard Library, such as \tcode{std}, or + \item modify an existing interface in the ISO/IEC 14882:2020 library in-place, + \item are declared in a namespace whose name appends \tcode{::experimental::concurrency\_v2} to a namespace defined in the ISO/IEC 14882:2020 library, such as \tcode{std}, or \item are declared in a subnamespace of a namespace described in the previous bullet, whose name is not the same as an existing subnamespace of namespace \tcode{std}. \end{itemize} @@ -156,17 +156,17 @@ % \rSec1[general.plans]{Future plans (Informative)} % %\pnum % This clause describes tentative plans for future versions of this document and plans for moving content into -% future versions of the C++ Standard. +% future versions of ISO/IEC 14882:2020. % \pnum % The C++ committee intends to release a new version of this document approximately every few years, containing -% the concurrency extensions we hope to add to a near-future version of the C++ Standard. Future versions will define their +% the concurrency extensions we hope to add to a near-future version of ISO/IEC 14882:2020. Future versions will define their % contents in \tcode{std::experimental::concurrency\_v3}, \tcode{std::experimental::concurrency\_v4}, etc., with the most recent % implemented version inlined into \tcode{std::ex\-perimental}. % \pnum % When an extension defined in this or a future version of this document represents enough existing practice, it -% will be moved into the next version of the C++ Standard by removing the \tcode{experimental::con\-currency\_v$N$} segment of its +% will be moved into the next version of ISO/IEC 14882:2020 by removing the \tcode{experimental::con\-currency\_v$N$} segment of its % namespace and by removing the \tcode{experimental/} prefix from its header's path. % \rSec1[general.ack]{Acknowledgments} From c78ddf35354c3b9c7c9209e1ada2585a82462b66 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 14 Jun 2024 09:58:44 -0700 Subject: [PATCH 078/114] bytewiseatomic: Take ISO editor wording to drop "must" Signed-off-by: Paul E. McKenney --- src/bytewiseatomic.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex index 7438b5a..6fb966f 100644 --- a/src/bytewiseatomic.tex +++ b/src/bytewiseatomic.tex @@ -67,7 +67,7 @@ %\begin{note} [NOTE: There is no requirement that the individual bytes be copied in order, or that the implementation -must operate on individual bytes.]%\end{note} +operates on individual bytes.]%\end{note} % \pnum \returns From 57ef512a57e656d2ff501b984ae4d2d1998a2944 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 14 Jun 2024 10:02:19 -0700 Subject: [PATCH 079/114] general: Drop "as-if" per ISO editor comments Signed-off-by: Paul E. McKenney --- src/general.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/general.tex b/src/general.tex index 7a3fd5f..c47e164 100644 --- a/src/general.tex +++ b/src/general.tex @@ -63,12 +63,12 @@ Whenever an unqualified name is used in the specification of a declaration \tcode{D}, its meaning is established -as-if in accordance with (\CppXref{4.1.2}) by performing unqualified name lookup +in accordance with (\CppXref{4.1.2}) by performing unqualified name lookup in the context of \tcode{D}. \begin{note} Argument-dependent lookup is not performed.\end{note} Similarly, the meaning of a \grammarterm{qualified-id} is established -as-if ina accordance with by performing qualified name lookup +in accordance with performing qualified name lookup in the context of \tcode{D}. \begin{note} Operators in expressions are not so constrained.\end{note} From c72c52051d72a92c051c5b53f9fe1c979c43d3c1 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 14 Jun 2024 10:18:19 -0700 Subject: [PATCH 080/114] treewide: Address additional ISO editor comments Signed-off-by: Paul E. McKenney --- src/bytewiseatomic.tex | 6 +++--- src/config.tex | 2 +- src/general.tex | 2 +- src/srHP.tex | 5 ++++- src/syncvalue.tex | 4 ++-- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex index 6fb966f..25dce9b 100644 --- a/src/bytewiseatomic.tex +++ b/src/bytewiseatomic.tex @@ -30,7 +30,7 @@ a race did not occur. %\begin{note} -[NOTE: So-called "seqlocks" are the canonical +[NOTE So-called "seqlocks" are the canonical example of such an idiom.]%\end{note} @@ -65,7 +65,7 @@ sequence of bytes to the destination. %\begin{note} -[NOTE: There is no requirement +[NOTE There is no requirement that the individual bytes be copied in order, or that the implementation operates on individual bytes.]%\end{note} @@ -103,7 +103,7 @@ \end{itemdescr} %\begin{note} -[NOTE: If any of the atomic byte loads performed by an +[NOTE If any of the atomic byte loads performed by an \tcode{atomic_load_per_byte_memcpy()} call A with \tcode{memory_order::acquire} argument take their value from an atomic byte store performed by \tcode{atomic_store_per_byte_memcpy()} call diff --git a/src/config.tex b/src/config.tex index e0bbc3f..de887fd 100644 --- a/src/config.tex +++ b/src/config.tex @@ -1,7 +1,7 @@ %!TEX root = ts.tex %%-------------------------------------------------- %% Version numbers -\newcommand{\docno}{N4968} +\newcommand{\docno}{} \newcommand{\isodocno}{ISO/IEC DTS 9922:2024(E)} \newcommand{\prevdocno}{N4895;N4953;N4956} \newcommand{\cppver}{201703L @@@} %% MW: need update diff --git a/src/general.tex b/src/general.tex index c47e164..2b0cff9 100644 --- a/src/general.tex +++ b/src/general.tex @@ -47,7 +47,7 @@ Conformance requirements for this document are those defined in \CppXref{4.1}, as applied to a merged document consisting of C++20 amended by this document. %%\begin{note} -NOTE: Conformance is defined in terms of the behaviour of programs.%%\end{note} +NOTE Conformance is defined in terms of the behaviour of programs.%%\end{note} \rSec1[general.namespaces]{Namespaces and headers and modifications to standard classes} %\pnum diff --git a/src/srHP.tex b/src/srHP.tex index 555c452..cfc09f0 100644 --- a/src/srHP.tex +++ b/src/srHP.tex @@ -40,6 +40,7 @@ evaluation $A$ if: \setenumerate[0]{label=(\alph*)} \begin{enumerate} +\setcounter{enumi}{3} \item \tcode{x} is not reclaimed; and \item \tcode{x} is retired to $dom$ in an evaluation $R$ and $A$ does not happen before $R$; and \item for all hazard pointers $h$ that belong to $dom$, $A$ does not happen before the end of @@ -482,7 +483,9 @@ %\pnum \effects -Swaps the hazard pointer ownership of this object with that of other. NOTE The owned hazard pointers, if any, remain unchanged during the swap and continue to be associated with the respective objects that they were protecting before the swap, if any. No protection epochs are ended or initiated. +Swaps the hazard pointer ownership of this object with that of other. + +NOTE The owned hazard pointers, if any, remain unchanged during the swap and continue to be associated with the respective objects that they were protecting before the swap, if any. No protection epochs are ended or initiated. %\pnum \complexity diff --git a/src/syncvalue.tex b/src/syncvalue.tex index 17a6d13..0bb5b2f 100644 --- a/src/syncvalue.tex +++ b/src/syncvalue.tex @@ -4,7 +4,7 @@ \rSec1[synchronizedvalue.general]{General} -This section describes a class template to provide locked access to a +This clause describes a class template to provide locked access to a value in order to facilitate the construction of race-free programs. \rSec1[synchronizedvalue.syn]{Header synopsis} @@ -141,7 +141,7 @@ \end{codeblock} \end{note} -\begin{note} The invocation of \tcode{f} can not call \tcode{apply} +\begin{note} The invocation of \tcode{f} cannot call \tcode{apply} directly or indirectly passing any of \tcode{values...}.\end{note} \end{itemdescr} From 0d476b80ca416725da236846755bbbd93f144894 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 14 Jun 2024 10:24:54 -0700 Subject: [PATCH 081/114] general: Embolden table titles per ISO editor Signed-off-by: Paul E. McKenney --- src/general.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/general.tex b/src/general.tex index 2b0cff9..7f89d57 100644 --- a/src/general.tex +++ b/src/general.tex @@ -85,7 +85,7 @@ %%\end{codeblock} -\begin{floattable}{C++ library headers}{tab:info.headers} +\begin{floattable}{\textbf{C++ library headers}}{tab:info.headers} {l} \topline \tcode{} \\ @@ -96,11 +96,11 @@ \end{floattable} -\rSec1[general.feature.test]{Feature-testing recommendations } +\rSec1[general.feature.test]{\textbf{Feature-testing recommendations}} %\pnum An implementation that provides support for this document should define each feature test macro defined in \tref{intro.features1} and \tref{intro.features2} if no associated headers are indicated for that macro, and if associated headers are indicated for a macro, that macro is defined after inclusion of one of the corresponding headers specified in \tref{intro.features1} and \tref{intro.features2}. -%%\begin{floattable}{Feature-test macros name}{tab:intro.features} +%%\begin{floattable}{\textbf{Feature-test macros name}}{tab:intro.features} %%{lllll} %%\topline %%\lhdr {Title} & \lhdr {Subclause} & \chdr{Macro name} & %%\rhdr{Value} & \rhdr{Header} \\ @@ -117,7 +117,7 @@ %%\tcode{Synchronized Value} & \tcode{8} & %%\tcode{__cpp_lib_experimental_synchronized_value} & %%\tcode{\tsver} & \tcode{} \\ %%\end{floattable} -\begin{floattable}{Feature-test macros name}{tab:intro.features1} +\begin{floattable}{\textbf{Feature-test macros name}}{tab:intro.features1} {lll} \topline \lhdr {Title} & \chdr {Subclause} & \rhdr{Macro name} \\ @@ -135,7 +135,7 @@ \end{floattable} -\begin{floattable}{Feature-test macros header}{tab:intro.features2} +\begin{floattable}{\textbf{Feature-test macros header}}{tab:intro.features2} {lll} \topline \lhdr {Title} & \chdr{Value} & \rhdr{Header} \\ From 340dfe2a9ba2f75711ba21ef0d36b0447b7210a0 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Fri, 14 Jun 2024 13:31:56 -0400 Subject: [PATCH 082/114] Updates from Overleaf --- src/front.tex | 1 + src/ts.tex | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/front.tex b/src/front.tex index 8f8abbb..4ad2b73 100644 --- a/src/front.tex +++ b/src/front.tex @@ -12,6 +12,7 @@ \renewcommand\@pnumwidth{2.5em} \makeatother + \begin{KeepFromToc} \tableofcontents \end{KeepFromToc} diff --git a/src/ts.tex b/src/ts.tex index faff217..5c26fe7 100644 --- a/src/ts.tex +++ b/src/ts.tex @@ -45,7 +45,9 @@ \usepackage{memhfixc} % fix interactions between hyperref and memoir \usepackage{xparse} \usepackage{xstring} - +\documentclass{article} +%\usepackage{fontspec} +%\setmainfont{XITS} \input{layout} \input{styles} \input{macros} From 4b15d3dce45cc0657c240d494e7809f02aefc210 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Fri, 14 Jun 2024 13:42:44 -0400 Subject: [PATCH 083/114] =?UTF-8?q?Updated=20to=202024=20Remove=20?= =?UTF-8?q?=E2=80=9CN=204968=E2=80=9D=20from=20the=20headers=20NOTES=20in?= =?UTF-8?q?=206.2.7.5=20should=20start=20on=20a=20new=20line=20instead=20o?= =?UTF-8?q?f=20in=20the=20middle=20of=20the=20line.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.tex | 6 +++--- src/cover-wd.tex | 2 +- src/srHP.tex | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/config.tex b/src/config.tex index de887fd..6b5c357 100644 --- a/src/config.tex +++ b/src/config.tex @@ -3,9 +3,9 @@ %% Version numbers \newcommand{\docno}{} \newcommand{\isodocno}{ISO/IEC DTS 9922:2024(E)} -\newcommand{\prevdocno}{N4895;N4953;N4956} +\newcommand{\prevdocno}{N4895;N4953;N4956;N4968} \newcommand{\cppver}{201703L @@@} %% MW: need update -\newcommand{\tsver}{202306} +\newcommand{\tsver}{202406} %% Title \newcommand{\doctitle}{Extensions to \Cpp for Concurrency Version 2 @@@} @@ -17,7 +17,7 @@ %% Release date \newcommand{\reldate}{\today} -\newcommand{\copyrightyear}{2023} +\newcommand{\copyrightyear}{2024} \newcommand{\cppstddocno}{ISO/IEC DTS 9922:2024(E)} %% Library chapters diff --git a/src/cover-wd.tex b/src/cover-wd.tex index 2f86cc0..230e4f3 100644 --- a/src/cover-wd.tex +++ b/src/cover-wd.tex @@ -11,7 +11,7 @@ \huge \textsf{\textbf{International}} \\ \huge \textsf{\textbf{Standard}} \\ ~ \vspace{2in} ~ \\ - \large \textsf{\textbf{\textcolor{red}{ISO SC22 WG21 N4968}}} \\ + %%\large \textsf{\textbf{\textcolor{red}{ISO SC22 WG21 N4968}}} \\ \\ \end{tabular} \\ \hline diff --git a/src/srHP.tex b/src/srHP.tex index cfc09f0..2e3e82f 100644 --- a/src/srHP.tex +++ b/src/srHP.tex @@ -431,7 +431,9 @@ %\pnum \returns -\tcode{old == ptr}. NOTE It is possible for \tcode{try_protect} to return \tcode{true} when \tcode{ptr} is a null pointer. +\tcode{old == ptr}. + +NOTE It is possible for \tcode{try_protect} to return \tcode{true} when \tcode{ptr} is a null pointer. %\pnum \complexity From aaa428659393cb9c1a6d11c5db7a52c70640aa22 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 14 Jun 2024 10:56:10 -0700 Subject: [PATCH 084/114] macros: Remove italics from defn, grammarterm, and contracts Signed-off-by: Paul E. McKenney --- src/macros.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/macros.tex b/src/macros.tex index eafb519..2c00432 100644 --- a/src/macros.tex +++ b/src/macros.tex @@ -225,7 +225,7 @@ \newcommand{\gterm}[1]{\GrammarStylex{#1}} \newcommand{\fakegrammarterm}[1]{\gterm{#1}} \newcommand{\keyword}[1]{\tcode{#1}\indextext{\idxcode{#1}}} % macro length: 8 -\newcommand{\grammarterm}[1]{\indexgram{\idxgram{#1}}\gterm{#1}} +\newcommand{\grammarterm}[1]{#1} \newcommand{\grammartermnc}[1]{\indexgram{\idxgram{#1}}\gterm{#1\nocorr}} \newcommand{\regrammarterm}[1]{\textit{#1}} \newcommand{\placeholder}[1]{\textit{#1}} % macro length: 12 @@ -236,7 +236,7 @@ \newcommand{\defnlibxname}[1]{\indexlibrary{\idxxname{#1}}\xname{#1}} % Non-compound defined term. -\newcommand{\defn}[1]{\defnx{#1}{#1}} +\newcommand{\defn}[1]{#1} % Defined term with different index entry. \newcommand{\defnx}[2]{\indexdefn{#2}\textit{#1}} % Compound defined term with 'see' for primary term. @@ -336,7 +336,7 @@ \makeatother %% Library function descriptions -\newcommand{\Fundescx}[1]{\textit{#1}} +\newcommand{\Fundescx}[1]{#1} \newcommand{\Fundesc}[1]{\Fundescx{#1}:\space} \newcommand{\recommended}{\Fundesc{Recommended practice}} \newcommand{\required}{\Fundesc{Required behaviour}} From 1b2ac14a22497c6250cab043d1c75b24ce7105a8 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 14 Jun 2024 11:13:55 -0700 Subject: [PATCH 085/114] treewide: Remove italicization due to "$$" Signed-off-by: Paul E. McKenney --- src/srHP.tex | 34 +++++++++++++++++----------------- src/srrcu.tex | 34 +++++++++++++++++----------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/srHP.tex b/src/srHP.tex index cfc09f0..d5ae4db 100644 --- a/src/srHP.tex +++ b/src/srHP.tex @@ -11,7 +11,7 @@ A class type \tcode{T} is \defn{hazard-protectable} if it has exactly one public base class of type \tcode{hazard_pointer_obj_base} for some \tcode{D} and no base classes of type \tcode{hazard_pointer_obj_base} for any other combination \tcode{T’}, \tcode{D’}. An object is \defn{hazard-protectable} if it is of hazard-protectable type. %\pnum -The span between creation and destruction of a hazard pointer $h$ is partitioned into a series of \defn{protection epochs}; in each protection epoch, $h$ either is \defn{associated with} a hazard-protectable object, or is \defn{unassociated}. Upon creation, a hazard pointer is unassociated. Changing the association (possibly to the same object) initiates a new protection epoch and ends the preceding one. +The span between creation and destruction of a hazard pointer h is partitioned into a series of \defn{protection epochs}; in each protection epoch, h either is \defn{associated with} a hazard-protectable object, or is \defn{unassociated}. Upon creation, a hazard pointer is unassociated. Changing the association (possibly to the same object) initiates a new protection epoch and ends the preceding one. %\pnum A hazard pointer \defn{belongs to} exactly one \defn{domain}. @@ -26,34 +26,34 @@ A retired object \tcode{x} is \defn{reclaimed} by invoking its deleter with a pointer to \tcode{x}. %\pnum -A hazard-protectable object \tcode{x} is \defn{definitely reclaimable} in a domain $dom$ with respect to -an evaluation $A$ if: +A hazard-protectable object \tcode{x} is \defn{definitely reclaimable} in a domain dom with respect to +an evaluation A if: \setenumerate[0]{label=(\alph*)} \begin{enumerate} \item \tcode{x} is not reclaimed, and -\item \tcode{x} is retired to $dom$ in an evaluation that happens before $A$, and -\item for all hazard pointers $h$ that belong to $dom$, the end of any protection epoch where $h$ is associated with \tcode{x} happens before $A$. +\item \tcode{x} is retired to dom in an evaluation that happens before A, and +\item for all hazard pointers h that belong to dom, the end of any protection epoch where h is associated with \tcode{x} happens before A. \end{enumerate} %\pnum -A hazard-protectable object \tcode{x} is \defn{possibly reclaimable} in domain $dom$ with respect to an -evaluation $A$ if: +A hazard-protectable object \tcode{x} is \defn{possibly reclaimable} in domain dom with respect to an +evaluation A if: \setenumerate[0]{label=(\alph*)} \begin{enumerate} \setcounter{enumi}{3} \item \tcode{x} is not reclaimed; and -\item \tcode{x} is retired to $dom$ in an evaluation $R$ and $A$ does not happen before $R$; and -\item for all hazard pointers $h$ that belong to $dom$, $A$ does not happen before the end of -any protection epoch where $h$ is associated with \tcode{x}; and -\item for all hazard pointers $h$ belonging to $dom$ and for every protection epoch $E$ of $h$ -during which $h$ is associated with \tcode{x}: +\item \tcode{x} is retired to dom in an evaluation R and A does not happen before R; and +\item for all hazard pointers h that belong to dom, A does not happen before the end of +any protection epoch where h is associated with \tcode{x}; and +\item for all hazard pointers h belonging to dom and for every protection epoch E of h +during which h is associated with \tcode{x}: \setenumerate[0]{label=(\arabic*)} \begin{enumerate} - \item $A$ does not happen before the end of $E$, and - \item if the beginning of $E$ happens before \tcode{x} is retired, the end of $E$ strongly -happens before $A$, and - \item if $E$ began by an evaluation of \tcode{try_protect} with argument \tcode{src}, label its -atomic load operation $L$. If there exists an atomic modification $B$ on \tcode{src} such that $L$ observes a modification that is modification-ordered before $B$, and $B$ happens before \tcode{x} is retired, the end of $E$ strongly happens before $A$. \begin{note} In typical use, a store to \tcode{src} sequenced before retiring \tcode{x} will be such an atomic operation $B$.\end{note} + \item A does not happen before the end of E, and + \item if the beginning of E happens before \tcode{x} is retired, the end of E strongly +happens before A, and + \item if E began by an evaluation of \tcode{try_protect} with argument \tcode{src}, label its +atomic load operation L. If there exists an atomic modification B on \tcode{src} such that L observes a modification that is modification-ordered before B, and B happens before \tcode{x} is retired, the end of E strongly happens before A. \begin{note} In typical use, a store to \tcode{src} sequenced before retiring \tcode{x} will be such an atomic operation B.\end{note} \end{enumerate} \begin{note} Condition d(2) and d(3) convey the informal notion that a protection epoch that began before retiring \tcode{x}, as implied either by the happens-before relation or the coherence order of some source, delays the reclamation of \tcode{x}.\end{note} \end{enumerate} diff --git a/src/srrcu.tex b/src/srrcu.tex index f450297..fa73129 100644 --- a/src/srrcu.tex +++ b/src/srrcu.tex @@ -18,17 +18,17 @@ of rcu-protectable type. % \pnum -An invocation of \tcode{unlock} $U$ on an \tcode{rcu_domain dom} corresponds -to an invocation of \tcode{lock} $L$ on \tcode{dom} if $L$ is -sequenced before $U$ and either +An invocation of \tcode{unlock} U on an \tcode{rcu_domain dom} corresponds +to an invocation of \tcode{lock} L on \tcode{dom} if L is +sequenced before U and either \begin{itemize} \item no other invocation of \tcode{lock} on \tcode{dom} is sequenced - after $L$ and before $U$ or + after L and before U or \item every invocation of \tcode{unlock} $U'$ on \tcode{dom} such - that $L$ is sequenced before $U'$ and $U'$ - is sequenced before $U$ corresponds to an invocation of - \tcode{lock} $L'$ on \tcode{dom} such that $L$ is sequenced + that L is sequenced before $U'$ and $U'$ + is sequenced before U corresponds to an invocation of + \tcode{lock} $L'$ on \tcode{dom} such that L is sequenced before $L'$ and $L'$ is sequenced before $U'$. \end{itemize} @@ -38,15 +38,15 @@ % \pnum A \defn{region of RCU protection} on a domain \tcode{dom} starts -with a \tcode{lock} $L$ on \tcode{dom} and ends with its corresponding -\tcode{unlock} $U$. +with a \tcode{lock} L on \tcode{dom} and ends with its corresponding +\tcode{unlock} U. % \pnum -Given a region of RCU protection $R$ on a domain \tcode{dom} -and given an evaluation $E$ that scheduled another evaluation -$F$ in \tcode{dom}, if $E$ does not strongly happen before -the start of $R$, the end of $R$ strongly happens before -evaluating $F$. +Given a region of RCU protection R on a domain \tcode{dom} +and given an evaluation E that scheduled another evaluation +F in \tcode{dom}, if E does not strongly happen before +the start of R, the end of R strongly happens before +evaluating F. % \pnum The evaluation of a scheduled evaluation is potentially concurrent with @@ -289,12 +289,12 @@ \effects May evaluate any scheduled evaluations in \tcode{dom}. For any evaluation that happens before the call -to \tcode{rcu_barrier} and that schedules an evaluation $E$ -in \tcode{dom}, blocks until $E$ has been evaluated. +to \tcode{rcu_barrier} and that schedules an evaluation E +in \tcode{dom}, blocks until E has been evaluated. % \pnum \sync -The evaluation of any such $E$ strongly +The evaluation of any such E strongly happens before the return from \tcode{rcu_barrier}. \end{itemdescr} From aa02ec5cda43005265e8803f54121ce1e49a303e Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 14 Jun 2024 11:15:23 -0700 Subject: [PATCH 086/114] macros: Remove italicization due to \exposid{} Signed-off-by: Paul E. McKenney --- src/macros.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/macros.tex b/src/macros.tex index 2c00432..bc8afa9 100644 --- a/src/macros.tex +++ b/src/macros.tex @@ -228,7 +228,7 @@ \newcommand{\grammarterm}[1]{#1} \newcommand{\grammartermnc}[1]{\indexgram{\idxgram{#1}}\gterm{#1\nocorr}} \newcommand{\regrammarterm}[1]{\textit{#1}} -\newcommand{\placeholder}[1]{\textit{#1}} % macro length: 12 +\newcommand{\placeholder}[1]{#1} % macro length: 12 \newcommand{\placeholdernc}[1]{\textit{#1\nocorr}} % macro length: 14 \newcommand{\exposid}[1]{\tcode{\placeholder{#1}}} % macro length: 8 \newcommand{\exposidnc}[1]{\tcode{\placeholdernc{#1}}\itcorr[-1]} % macro length: 10 @@ -612,7 +612,7 @@ \newcommand{\nontermdef}[1]{{\BnfNontermshape##1\itcorr}\indexgrammar{\idxgram{##1}}\textnormal{:}} \newcommand{\terminal}[1]{{\BnfTermshape ##1}} \renewcommand{\keyword}[1]{\terminal{##1}\indextext{\idxcode{##1}}} - \renewcommand{\exposid}[1]{\terminal{\textit{##1}}} + \renewcommand{\exposid}[1]{\terminal{##1}} \renewcommand{\placeholder}[1]{\textrm{\textit{##1}}} \newcommand{\descr}[1]{\textnormal{##1}} \newcommand{\bnfindent}{\hspace*{\bnfindentfirst}} From a35339fe672ced2a2e71eee39fb77fd310ad6a97 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 14 Jun 2024 11:20:05 -0700 Subject: [PATCH 087/114] srrcu: Remove italicization due to "$$" with non-alpha argument Signed-off-by: Paul E. McKenney --- src/srrcu.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/srrcu.tex b/src/srrcu.tex index fa73129..0067ae8 100644 --- a/src/srrcu.tex +++ b/src/srrcu.tex @@ -25,11 +25,11 @@ \begin{itemize} \item no other invocation of \tcode{lock} on \tcode{dom} is sequenced after L and before U or -\item every invocation of \tcode{unlock} $U'$ on \tcode{dom} such - that L is sequenced before $U'$ and $U'$ +\item every invocation of \tcode{unlock} U' on \tcode{dom} such + that L is sequenced before U' and U' is sequenced before U corresponds to an invocation of - \tcode{lock} $L'$ on \tcode{dom} such that L is sequenced - before $L'$ and $L'$ is sequenced before $U'$. + \tcode{lock} L' on \tcode{dom} such that L is sequenced + before L' and L' is sequenced before U'. \end{itemize} NOTE From e21e2a995dd371ebcbd72d7764204c69f8b47ba1 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 14 Jun 2024 11:25:39 -0700 Subject: [PATCH 088/114] macros: Remove italicization due to \oldconcept{} Signed-off-by: Paul E. McKenney --- src/macros.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/macros.tex b/src/macros.tex index bc8afa9..eb73553 100644 --- a/src/macros.tex +++ b/src/macros.tex @@ -425,7 +425,7 @@ %% Concepts \newcommand{\oldconceptname}[1]{Cpp17#1} -\newcommand{\oldconcept}[1]{\textit{\oldconceptname{#1}}} +\newcommand{\oldconcept}[1]{\oldconceptname{#1}} \newcommand{\defnoldconcept}[1]{\indexdefn{\idxoldconcept{#1}}\oldconcept{#1}} \newcommand{\idxoldconcept}[1]{\oldconceptname{#1}@\oldconcept{#1}} % FIXME: A "new" oldconcept (added after C++17), From 8a235bb65a04c043bcba98da6d1da5797e3f714e Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 21 Jun 2024 09:20:30 -0700 Subject: [PATCH 089/114] general,order: Add editor advice for changes Signed-off-by: Paul E. McKenney --- src/general.tex | 9 +++------ src/order.tex | 11 +++++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/general.tex b/src/general.tex index 7f89d57..2a4072e 100644 --- a/src/general.tex +++ b/src/general.tex @@ -3,12 +3,9 @@ \rSec0[scope]{Scope} %\pnum -This document describes requirements for implementations of an interface that computer programs written in the C++ programming language could use to invoke algorithms with concurrent execution. The algorithms described by this document are realizable across a broad class of computer architectures. - -%\pnum -This document provides important context and specification for -this document. This document is written as a set of changes against that specification. Instructions to modify or add paragraphs are written as -explicit instructions. +This document builds upon ISO/IEC 9899 +by describing requirements for implementations of an interface that computer programs written in the C++ programming language could use to invoke algorithms with concurrent execution. The algorithms described by this document are realizable across a broad class of computer architectures. +This document is written as a set of differences from the base standard. %\pnum Some of the functionality described by this document might be considered for standardization in a future version of C++, but it is not currently part of ISO/IEC 14882:2020. Some of the functionality in this document might never be standardized, and other functionality might be standardized in a substantially changed form. diff --git a/src/order.tex b/src/order.tex index ca27e4c..2a02332 100644 --- a/src/order.tex +++ b/src/order.tex @@ -1,13 +1,16 @@ %!TEX root = ts.tex -\setcounter{chapter}{32} -\rSec0[thread]{Concurrency support library} -\setcounter{section}{4} -\rSec1[atomics]{Atomic operations} +\setcounter{chapter}{33} +% \rSec0[thread]{Concurrency support library} +\setcounter{section}{5} +% \rSec1[atomics]{Atomic operations} \setcounter{subsection}{3} \rSec2[atomics.order]{Order and consistency} +This clause specifies differences in requirements to ISO/IEC 9899:2018 +in order to support an asymmetric fence. + In \CppXref{33.5.4} paragraph 4, instead of: \begin{quote} From d5d22a5ed33077700a321829ec74ab024ad9c38a Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 21 Jun 2024 09:24:48 -0700 Subject: [PATCH 090/114] general,order: Fix standard number, C++ rather than C Signed-off-by: Paul E. McKenney --- src/general.tex | 2 +- src/order.tex | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/general.tex b/src/general.tex index 2a4072e..39fe0f1 100644 --- a/src/general.tex +++ b/src/general.tex @@ -3,7 +3,7 @@ \rSec0[scope]{Scope} %\pnum -This document builds upon ISO/IEC 9899 +This document builds upon ISO/IEC 14882 by describing requirements for implementations of an interface that computer programs written in the C++ programming language could use to invoke algorithms with concurrent execution. The algorithms described by this document are realizable across a broad class of computer architectures. This document is written as a set of differences from the base standard. diff --git a/src/order.tex b/src/order.tex index 2a02332..c30b420 100644 --- a/src/order.tex +++ b/src/order.tex @@ -8,8 +8,8 @@ \setcounter{subsection}{3} \rSec2[atomics.order]{Order and consistency} -This clause specifies differences in requirements to ISO/IEC 9899:2018 -in order to support an asymmetric fence. +This clause specifies differences in requirements to ISO/IEC 14882:2020 +in order to support asymmetric fences. In \CppXref{33.5.4} paragraph 4, instead of: From a27a45e1ba4ceb6347455c9038198db4181a70bc Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 21 Jun 2024 09:28:11 -0700 Subject: [PATCH 091/114] general: Avoid the word "changed" Signed-off-by: Paul E. McKenney --- src/general.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/general.tex b/src/general.tex index 39fe0f1..0272c46 100644 --- a/src/general.tex +++ b/src/general.tex @@ -8,7 +8,7 @@ This document is written as a set of differences from the base standard. %\pnum -Some of the functionality described by this document might be considered for standardization in a future version of C++, but it is not currently part of ISO/IEC 14882:2020. Some of the functionality in this document might never be standardized, and other functionality might be standardized in a substantially changed form. +Some of the functionality described by this document might be considered for standardization in a future version of C++, but it is not currently part of ISO/IEC 14882:2020. Some of the functionality in this document might never be standardized, and other functionality might be standardized in a substantially different form. %\pnum The goal of this document is to build widespread existing practice for concurrency in the ISO/IEC 14882:2020 algorithms library. It gives advice on extensions to those vendors who wish to provide them. From a6aa505e93734ca4e0451fac92d1f5052d34d905 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 5 Jul 2024 09:17:46 -0700 Subject: [PATCH 092/114] treewide: Replace "C++20" with ISO/IEC 14882:2020 In accordance with the ISO Editor's wishes. Signed-off-by: Paul E. McKenney --- src/general.tex | 2 +- src/macros.tex | 4 ++-- src/ts.tex | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/general.tex b/src/general.tex index 0272c46..6485474 100644 --- a/src/general.tex +++ b/src/general.tex @@ -41,7 +41,7 @@ \rSec1[general.compliance]{Implementation compliance} %\pnum -Conformance requirements for this document are those defined in \CppXref{4.1}, as applied to a merged document consisting of C++20 amended by this document. +Conformance requirements for this document are those defined in \CppXref{4.1}, as applied to a merged document consisting of ISO/IEC 14882:2020 amended by this document. %%\begin{note} NOTE Conformance is defined in terms of the behaviour of programs.%%\end{note} diff --git a/src/macros.tex b/src/macros.tex index eb73553..d4cdf08 100644 --- a/src/macros.tex +++ b/src/macros.tex @@ -296,7 +296,7 @@ {} \newenvironment{#1} {\begin{tail#1}} -{\end{tail#1}\small\par} % \small\par is for C++20 post-DIS compatibility +{\end{tail#1}\small\par} % \small\par is for ISO/IEC 14882:2020 post-DIS compatibility } \newnoteenvironment{note}{NOTE \arabic{note}}{end note} @@ -314,7 +314,7 @@ {\noteoutro{#3}} \newenvironment{#1} {\begin{tail#1}} -{\end{tail#1}\small\par} % \small\par is for C++20 post-DIS compatibility +{\end{tail#1}\small\par} % \small\par is for ISO/IEC 14882:2020 post-DIS compatibility } \newexplenvironment{example}{EXAMPLE \arabic{example}}{end EXAMPLE} diff --git a/src/ts.tex b/src/ts.tex index 5c26fe7..1131c64 100644 --- a/src/ts.tex +++ b/src/ts.tex @@ -62,7 +62,7 @@ \newcommand{\completionsig}{\Fundesc{Completion signature}} \newcommand{\DEDUCED}{\textit{\texttt{DEDUCED}}} \newcommand{\nativeref}{see~\ref{socket.reqmts.native}} -\newcommand{\CppXref}[1]{\texorpdfstring{C\kern-0.05em\protect\raisebox{.35ex}{\textsmaller[2]{+\kern-0.05em+}}20}{C++20} \S#1} +\newcommand{\CppXref}[1]{ISO/IEC 14882:2020, \S#1} \newcommand{\CppXrefInAccord}[1]{in accordance with ISO/IEC 14882:2020, #1} % Alternative formatting of cross-references, resolving stable name to number. % Needs include{cxx} and CppXIV from cplusplus/draft/source/macros.tex. From 5808f04d5c07f3ec0923a9b558dbae6dc9349ff6 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 10 Jul 2024 11:30:35 -0700 Subject: [PATCH 093/114] general: Use non-breaking space to adjust Table 3 Per ISO Editor's request. Signed-off-by: Paul E. McKenney --- src/general.tex | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/general.tex b/src/general.tex index 6485474..7dd0d1c 100644 --- a/src/general.tex +++ b/src/general.tex @@ -150,6 +150,12 @@ \end{floattable} +~ + +~ + +~ + % \rSec1[general.plans]{Future plans (Informative)} % %\pnum % This clause describes tentative plans for future versions of this document and plans for moving content into From 54cfb11364c6ff9dfed32e4aa24628e6dde49576 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 10 Jul 2024 11:34:38 -0700 Subject: [PATCH 094/114] macros: Remove colon after "NOTE" Per ISO Editor request. Signed-off-by: Paul E. McKenney --- src/macros.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/macros.tex b/src/macros.tex index d4cdf08..c33be9a 100644 --- a/src/macros.tex +++ b/src/macros.tex @@ -280,7 +280,7 @@ \newcommand{\leftshift}[1]{\ensuremath{\mathbin{\mathsf{lshift}_{#1}}}} %% Notes and examples -\newcommand{\noteintro}[1]{#1:} +\newcommand{\noteintro}[1]{#1} \newcommand{\noteoutro}[1]{\,---\,#1\kern.5pt]} % \newnoteenvironment{ENVIRON}{BEGIN TEXT}{END TEXT} From 9fe093cff8b1ecd80501733b85947d93632d0da0 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 10 Jul 2024 11:38:52 -0700 Subject: [PATCH 095/114] ts: Remove page break prior to hazard pointers Per ISO Editor request. Signed-off-by: Paul E. McKenney --- src/ts.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ts.tex b/src/ts.tex index 1131c64..d684f65 100644 --- a/src/ts.tex +++ b/src/ts.tex @@ -120,8 +120,8 @@ \include{general} %%\include{modifications} \include{syncvalue} -\include{srgeneral} -\include{srHP} +\input{srgeneral} +\input{srHP} \include{srrcu} \include{bytewiseatomic} \include{asymmetric} From b7d81068d1a5d8326dc8d8be7bb5c6df69e588ee Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 10 Jul 2024 11:40:40 -0700 Subject: [PATCH 096/114] bytewiseatomic: Remove "[" prior to NOTE. Per ISO Editor request. Signed-off-by: Paul E. McKenney --- src/bytewiseatomic.tex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bytewiseatomic.tex b/src/bytewiseatomic.tex index 25dce9b..4023fe4 100644 --- a/src/bytewiseatomic.tex +++ b/src/bytewiseatomic.tex @@ -30,8 +30,8 @@ a race did not occur. %\begin{note} -[NOTE So-called "seqlocks" are the canonical -example of such an idiom.]%\end{note} +NOTE So-called "seqlocks" are the canonical +example of such an idiom.%\end{note} \rSec1[atomiccpy.load]{\tcode{atomic_load_per_byte_memcpy}} @@ -65,9 +65,9 @@ sequence of bytes to the destination. %\begin{note} -[NOTE There is no requirement +NOTE There is no requirement that the individual bytes be copied in order, or that the implementation -operates on individual bytes.]%\end{note} +operates on individual bytes.%\end{note} % \pnum \returns @@ -103,10 +103,10 @@ \end{itemdescr} %\begin{note} -[NOTE If any of the atomic byte loads performed by an +NOTE If any of the atomic byte loads performed by an \tcode{atomic_load_per_byte_memcpy()} call A with \tcode{memory_order::acquire} argument take their value from an atomic byte store performed by \tcode{atomic_store_per_byte_memcpy()} call B with \tcode{memory_order::release} argument, then the start of B -strongly happens before the completion of A.]%\end{note} +strongly happens before the completion of A.%\end{note} %%\end{quote} From 1711f8be2569cdc2f7700f300e344cca7494cc7b Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 10 Jul 2024 11:44:35 -0700 Subject: [PATCH 097/114] order: Promote to top-level section Per ISO Editor request. Signed-off-by: Paul E. McKenney --- src/order.tex | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/order.tex b/src/order.tex index c30b420..1e07787 100644 --- a/src/order.tex +++ b/src/order.tex @@ -1,12 +1,13 @@ %!TEX root = ts.tex -\setcounter{chapter}{33} +% \setcounter{chapter}{33} % \rSec0[thread]{Concurrency support library} -\setcounter{section}{5} +% \setcounter{section}{5} % \rSec1[atomics]{Atomic operations} -\setcounter{subsection}{3} -\rSec2[atomics.order]{Order and consistency} +% \setcounter{subsection}{3} +% \rSec2[atomics.order]{Order and consistency} +\rSec0[atomics.order]{Order and consistency} This clause specifies differences in requirements to ISO/IEC 14882:2020 in order to support asymmetric fences. From 9ceade47ac4797e8cba0c5f1ab204812647aeb1e Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 10 Jul 2024 11:48:30 -0700 Subject: [PATCH 098/114] order: Reword per ISO Editor request Signed-off-by: Paul E. McKenney --- src/order.tex | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/order.tex b/src/order.tex index 1e07787..c93532f 100644 --- a/src/order.tex +++ b/src/order.tex @@ -9,23 +9,23 @@ % \rSec2[atomics.order]{Order and consistency} \rSec0[atomics.order]{Order and consistency} -This clause specifies differences in requirements to ISO/IEC 14882:2020 -in order to support asymmetric fences. +% This clause specifies differences in requirements to ISO/IEC 14882:2020 +% in order to support asymmetric fences. -In \CppXref{33.5.4} paragraph 4, instead of: +% In \CppXref{33.5.4} paragraph 4, instead of: -\begin{quote} -``the following four conditions are required to be satisfied by $S$''. -\end{quote} +% \begin{quote} +% ``the following four conditions are required to be satisfied by $S$''. +% \end{quote} -this document requires: +% this document requires: -\begin{quote} -``the following conditions are required to be satisfied by $S$''. -\end{quote} +% \begin{quote} +% ``the following conditions are required to be satisfied by $S$''. +% \end{quote} -In addition to the items in the bulleted list, this document has the -following requirements: +In addition to the requirements of ISO/IEC 14882:2020, 33.5.4, the +following conditions are required to be satisfied by $S$: \begin{quote} %%\setcounter{Paras}{3} % \pnum From 653aff92c49f7031769ef99e92dc71ebedcb049f Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 12 Jul 2024 10:50:24 -0700 Subject: [PATCH 099/114] general: Crowbar Table 1 ("C++ library headers") Per ISO Editor request. This approach will not work in a larger and more complex document where tables and their references are often added or removed. Signed-off-by: Paul E. McKenney --- src/general.tex | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/general.tex b/src/general.tex index 7dd0d1c..1b94719 100644 --- a/src/general.tex +++ b/src/general.tex @@ -71,7 +71,7 @@ Operators in expressions are not so constrained.\end{note} %\pnum -Table~\ref{tab:info.headers} shows the headers described in this document +Table~1 shows the headers described in this document %%shall import the contents of %%\tcode{::std::experimental::concurrency::v2} into %%\tcode{::std::experimental::concurrency_v1} as if by: @@ -82,16 +82,26 @@ %%\end{codeblock} -\begin{floattable}{\textbf{C++ library headers}}{tab:info.headers} -{l} -\topline +% \begin{floattable}{\textbf{C++ library headers}}{tab:info.headers} +% {l} +% \topline +\begin{table}[htb] +\centering +Table 1 \textemdash\ \textbf{C++ library headers} + +\vspace{0.1in} +\begin{tabular}{|l|} +\hline \tcode{} \\ \tcode{} \\ \tcode{} \\ \tcode{} \\ \tcode{} \\ +\hline +\end{tabular} +\end{table} -\end{floattable} +% \end{floattable} \rSec1[general.feature.test]{\textbf{Feature-testing recommendations}} %\pnum From 6587602b15c0aa3e50f6b9f87f8f41aab43e22e1 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 12 Jul 2024 10:56:56 -0700 Subject: [PATCH 100/114] general: Crowbar Table 2 ("Feature-test macros name") Per ISO Editor request. This approach will not work in a larger and more complex document where tables and their references are often added or removed. Signed-off-by: Paul E. McKenney --- src/general.tex | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/src/general.tex b/src/general.tex index 1b94719..6498e8c 100644 --- a/src/general.tex +++ b/src/general.tex @@ -105,7 +105,7 @@ \rSec1[general.feature.test]{\textbf{Feature-testing recommendations}} %\pnum -An implementation that provides support for this document should define each feature test macro defined in \tref{intro.features1} and \tref{intro.features2} if no associated headers are indicated for that macro, and if associated headers are indicated for a macro, that macro is defined after inclusion of one of the corresponding headers specified in \tref{intro.features1} and \tref{intro.features2}. +An implementation that provides support for this document should define each feature test macro defined in Table~2 and \tref{intro.features2} if no associated headers are indicated for that macro, and if associated headers are indicated for a macro, that macro is defined after inclusion of one of the corresponding headers specified in Table~2 and \tref{intro.features2}. %%\begin{floattable}{\textbf{Feature-test macros name}}{tab:intro.features} %%{lllll} @@ -124,15 +124,24 @@ %%\tcode{Synchronized Value} & \tcode{8} & %%\tcode{__cpp_lib_experimental_synchronized_value} & %%\tcode{\tsver} & \tcode{} \\ %%\end{floattable} -\begin{floattable}{\textbf{Feature-test macros name}}{tab:intro.features1} -{lll} -\topline -\lhdr {Title} & \chdr {Subclause} & \rhdr{Macro name} \\ +% \begin{floattable}{\textbf{Feature-test macros name}}{tab:intro.features1} +% {lll} +% \topline +\begin{table}[htb] +\centering +Table 2 \textemdash\ \textbf{Feature-test macros name} + +\vspace{0.1in} +\begin{tabular}{|lll|} +\hline +\textbf{Title} & \textbf{Subclause} & \textbf{Macro name} \\ +\hline +\hline %%{ll} %%\lhdr {Title} & %%\rhdr {Subclause \\ Macro name \\ Value \\ Header} \\ -\capsep +% \capsep %%\tcode{__cpp_concurrency\_v2} & \tcode{\tsver} & none \\ \tcode{Synchronized Value} & \tcode{5} & \tcode{__cpp_lib_experimental_synchronized_value} \\ \tcode{Hazard pointers} & \tcode{6.2} & \tcode{__cpp_lib_experimental_hazard_pointer} \\ @@ -140,7 +149,10 @@ \tcode{Bytewise atomic memcpy} & \tcode{7} & \tcode{__cpp_lib_experimental_bytewise_atomic_memcpy} \\ \tcode{Asymmetric Fence} & \tcode{8,33} & \tcode{__cpp_lib_experimental_asymmetric_fence} \\ -\end{floattable} +% \end{floattable} +\hline +\end{tabular} +\end{table} \begin{floattable}{\textbf{Feature-test macros header}}{tab:intro.features2} {lll} @@ -166,6 +178,14 @@ ~ +~ + +~ + +~ + +~ + % \rSec1[general.plans]{Future plans (Informative)} % %\pnum % This clause describes tentative plans for future versions of this document and plans for moving content into From 8c866312919488d721b683d00a63d968ed3b6051 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 12 Jul 2024 11:08:03 -0700 Subject: [PATCH 101/114] general: Crowbar Table 3 ("Feature-test macros header") Per ISO Editor request. This approach will not work in a larger and more complex document where tables and their references are often added or removed. Signed-off-by: Paul E. McKenney --- src/general.tex | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/general.tex b/src/general.tex index 6498e8c..05ca077 100644 --- a/src/general.tex +++ b/src/general.tex @@ -105,7 +105,7 @@ \rSec1[general.feature.test]{\textbf{Feature-testing recommendations}} %\pnum -An implementation that provides support for this document should define each feature test macro defined in Table~2 and \tref{intro.features2} if no associated headers are indicated for that macro, and if associated headers are indicated for a macro, that macro is defined after inclusion of one of the corresponding headers specified in Table~2 and \tref{intro.features2}. +An implementation that provides support for this document should define each feature test macro defined in Table~2 and Table~3 if no associated headers are indicated for that macro, and if associated headers are indicated for a macro, that macro is defined after inclusion of one of the corresponding headers specified in Table~2 and Table~3. %%\begin{floattable}{\textbf{Feature-test macros name}}{tab:intro.features} %%{lllll} @@ -154,23 +154,35 @@ \end{tabular} \end{table} -\begin{floattable}{\textbf{Feature-test macros header}}{tab:intro.features2} -{lll} -\topline -\lhdr {Title} & \chdr{Value} & \rhdr{Header} \\ +% \begin{floattable}{\textbf{Feature-test macros header}}{tab:intro.features2} +% {lll} +% \topline +% \lhdr {Title} & \chdr{Value} & \rhdr{Header} \\ +\begin{table}[htb] +\centering +Table 3 \textemdash\ \textbf{Feature-test macros header} + +\vspace{0.1in} +\begin{tabular}{|lll|} +\hline +\textbf{Title} & \textbf{Value} & \textbf{Header} \\ +\hline %%{ll} %%\lhdr {Title} & %%\rhdr {Subclause \\ Macro name \\ Value \\ Header} \\ -\capsep +% \capsep %%\tcode{__cpp_concurrency\_v2} & \tcode{\tsver} & none \\ \tcode{Synchronized Value} & \tcode{\tsver} & \tcode{} \\ \tcode{Hazard pointers} & \tcode{\tsver} & \tcode{} \\ \tcode{Read-copy update(RCU)} & \tcode{\tsver} & \tcode{} \\ \tcode{Bytewise atomic memcpy} & \tcode{\tsver} & \tcode{} \\ \tcode{Asymmetric Fence} & \tcode{\tsver} & \tcode{} \\ +\hline +\end{tabular} +\end{table} -\end{floattable} +% \end{floattable} ~ From fabfcda9a79c296102cca062f156f29407ffe33d Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Fri, 19 Jul 2024 09:50:27 -0400 Subject: [PATCH 102/114] Restore clause 9 para 4 --- src/order.tex | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/order.tex b/src/order.tex index c93532f..0dcd970 100644 --- a/src/order.tex +++ b/src/order.tex @@ -9,23 +9,21 @@ % \rSec2[atomics.order]{Order and consistency} \rSec0[atomics.order]{Order and consistency} -% This clause specifies differences in requirements to ISO/IEC 14882:2020 -% in order to support asymmetric fences. +The requirements of ISO/IEC 14882:2020, 33.5.4 apply to this document in order to support asymmetric fences, except where in \CppXref{33.5.4} paragraph 4, instead of: -% In \CppXref{33.5.4} paragraph 4, instead of: - -% \begin{quote} -% ``the following four conditions are required to be satisfied by $S$''. -% \end{quote} +\begin{quote} +``the following four conditions are required to be satisfied by $S$''. +\end{quote} -% this document requires: +this document requires: -% \begin{quote} -% ``the following conditions are required to be satisfied by $S$''. -% \end{quote} +\begin{quote} +``the following conditions are required to be satisfied by $S$''. +\end{quote} -In addition to the requirements of ISO/IEC 14882:2020, 33.5.4, the -following conditions are required to be satisfied by $S$: +%In addition to the requirements of ISO/IEC 14882:2020, 33.5.4, the +%following conditions are required to be satisfied by $S$: +In addition to the items in the bulleted list, this document has the following requirements: \begin{quote} %%\setcounter{Paras}{3} % \pnum From 223037befd5b743600ce6610e48f4e002aa3e685 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 26 Jul 2024 08:48:07 -0700 Subject: [PATCH 103/114] general: Embolden full table headers Per ISO editor request. Signed-off-by: Paul E. McKenney --- src/general.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/general.tex b/src/general.tex index 05ca077..de8b64c 100644 --- a/src/general.tex +++ b/src/general.tex @@ -87,7 +87,7 @@ % \topline \begin{table}[htb] \centering -Table 1 \textemdash\ \textbf{C++ library headers} +\textbf{Table 1 \textemdash\ C++ library headers} \vspace{0.1in} \begin{tabular}{|l|} @@ -129,7 +129,7 @@ % \topline \begin{table}[htb] \centering -Table 2 \textemdash\ \textbf{Feature-test macros name} +\textbf{Table 2 \textemdash\ Feature-test macros name} \vspace{0.1in} \begin{tabular}{|lll|} @@ -160,7 +160,7 @@ % \lhdr {Title} & \chdr{Value} & \rhdr{Header} \\ \begin{table}[htb] \centering -Table 3 \textemdash\ \textbf{Feature-test macros header} +\textbf{Table 3 \textemdash\ Feature-test macros header} \vspace{0.1in} \begin{tabular}{|lll|} From 8547f8a8daf8657775050ff64caced2010b4ae36 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 26 Jul 2024 08:58:09 -0700 Subject: [PATCH 104/114] order: Additional rewording per ISO Editor request Signed-off-by: Paul E. McKenney --- src/order.tex | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/order.tex b/src/order.tex index 0dcd970..0d378d5 100644 --- a/src/order.tex +++ b/src/order.tex @@ -9,27 +9,17 @@ % \rSec2[atomics.order]{Order and consistency} \rSec0[atomics.order]{Order and consistency} -The requirements of ISO/IEC 14882:2020, 33.5.4 apply to this document in order to support asymmetric fences, except where in \CppXref{33.5.4} paragraph 4, instead of: +The requirements of ISO/IEC 14882:2020, 33.5.4 apply to this document in order to support asymmetric fences. -\begin{quote} -``the following four conditions are required to be satisfied by $S$''. -\end{quote} - -this document requires: - -\begin{quote} -``the following conditions are required to be satisfied by $S$''. -\end{quote} +In addition to the four conditions required to be satisfied by $S$, which are listed in ISO/IEC 14882:2020, 33.5.4, paragraph 4, this document requires the following conditions: %In addition to the requirements of ISO/IEC 14882:2020, 33.5.4, the %following conditions are required to be satisfied by $S$: -In addition to the items in the bulleted list, this document has the following requirements: +%In addition to the items in the bulleted list, this document has the following requirements: \begin{quote} %%\setcounter{Paras}{3} % \pnum \begin{itemize} -\item - ... \item if a \tcode{memory_order::seq_cst} lightweight-fence $X$ happens before $A$ and $B$ happens before a \tcode{memory_order::seq_cst} heavyweight-fence $Y$, then $X$ precedes $Y$ in $S$; and From ec60e2a9b7b685d31c51bcb94012058a8f4e612f Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 25 Oct 2024 09:28:11 -0700 Subject: [PATCH 105/114] styles: Rework footer per ISO Editor directions Put page number under middle footer and eliminate left and right footers. Signed-off-by: Paul E. McKenney --- src/styles.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/styles.tex b/src/styles.tex index acf0cee..520c9a2 100644 --- a/src/styles.tex +++ b/src/styles.tex @@ -23,8 +23,8 @@ \makepagestyle{cpppage} \makeevenhead{cpppage}{\textsc{ISO/IEC DTS 9922:2024(E)}}{}{\textbf{\docno}} \makeoddhead{cpppage}{\textsc{ISO/IEC DTS 9922:2024(E)}}{}{\textbf{\docno}} -\makeevenfoot{cpppage}{\leftmark}{© ISO/IEC 2024 – All rights reserved}{\thepage} -\makeoddfoot{cpppage}{\leftmark}{© ISO/IEC 2024 – All rights reserved}{\thepage} +\makeevenfoot{cpppage}{}{© ISO/IEC 2024 – All rights reserved \\ \thepage}{} +\makeoddfoot{cpppage}{}{© ISO/IEC 2024 – All rights reserved \\ \thepage}{} \makeatletter \makepsmarks{cpppage}{% From c7f8fc5afacad00110f450ad7472722692568aa4 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 1 Nov 2024 08:35:16 -0700 Subject: [PATCH 106/114] foreword: Put URLs in normal font per ISO editor direction Remove \url{} and be thankful that none of the URLs contained "_", "$", or any of a number of other unfortunate characters. Signed-off-by: Paul E. McKenney --- src/foreword.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/foreword.tex b/src/foreword.tex index 39978d1..e34caaf 100644 --- a/src/foreword.tex +++ b/src/foreword.tex @@ -4,14 +4,14 @@ ISO (the International Organization for Standardization) and IEC (the International Electrotechnical Commission) form the specialized system for worldwide standardization. National bodies that are members of ISO or IEC participate in the development of International Standards through technical committees established by the respective organization to deal with particular fields of technical activity. ISO and IEC technical committees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the work. -The procedures used to develop this document and those intended for its further maintenance are described in the ISO/IEC Directives, Part 1. In particular, the different approval criteria needed for the different types of document should be noted. This document was drafted in accordance with the editorial rules of the ISO/IEC Directives, Part 2 (see \url{www.iso.org/directives} or \url{www.iec.ch/members_experts/refdocs}). +The procedures used to develop this document and those intended for its further maintenance are described in the ISO/IEC Directives, Part 1. In particular, the different approval criteria needed for the different types of document should be noted. This document was drafted in accordance with the editorial rules of the ISO/IEC Directives, Part 2 (see www.iso.org/directives or www.iec.ch/members_experts/refdocs). -ISO and IEC draw attention to the possibility that the implementation of this document may involve the use of (a) patent(s). ISO and IEC take no position concerning the evidence, validity or applicability of any claimed patent rights in respect thereof. As of the date of publication of this document, ISO and IEC had not received notice of (a) patent(s) which may be required to implement this document. However, implementers are cautioned that this may not represent the latest information, which may be obtained from the patent database available at \url{www.iso.org/patents} and \url{https://patents.iec.ch}. ISO and IEC shall not be held responsible for identifying any or all such patent rights. +ISO and IEC draw attention to the possibility that the implementation of this document may involve the use of (a) patent(s). ISO and IEC take no position concerning the evidence, validity or applicability of any claimed patent rights in respect thereof. As of the date of publication of this document, ISO and IEC had not received notice of (a) patent(s) which may be required to implement this document. However, implementers are cautioned that this may not represent the latest information, which may be obtained from the patent database available at www.iso.org/patents and https://patents.iec.ch. ISO and IEC shall not be held responsible for identifying any or all such patent rights. Any trade name used in this document is information given for the convenience of users and does not constitute an endorsement. -For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and expressions related to conformity assessment, as well as information about ISO's adherence to the World Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT) see \url{www.iso.org/iso/foreword.html}. In the IEC, see \url{www.iec.ch/understanding-standards}. +For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and expressions related to conformity assessment, as well as information about ISO's adherence to the World Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT) see www.iso.org/iso/foreword.html. In the IEC, see www.iec.ch/understanding-standards. This document was prepared by Joint Technical Committee ISO/IEC JTC 1, \emph{Information technology}, Subcommittee SC 22, \emph{Programming languages, their environments and system software interfaces}. -Any feedback or questions on this document should be directed to the user’s national standards body. A complete listing of these bodies can be found at \url{www.iso.org/members.html} and \url{www.iec.ch/national-committees}. +Any feedback or questions on this document should be directed to the user’s national standards body. A complete listing of these bodies can be found at www.iso.org/members.html and www.iec.ch/national-committees. From 48cfbedc92590cad319a2bd57c6c4dd2b140bab9 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 1 Nov 2024 08:54:32 -0700 Subject: [PATCH 107/114] general: Add table hyperlinks per ISO Editor request Signed-off-by: Paul E. McKenney --- src/general.tex | 46 ++++++++++++++++++++++++++++++++++++++++++++-- src/ts.tex | 1 + 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/src/general.tex b/src/general.tex index de8b64c..0b3fe43 100644 --- a/src/general.tex +++ b/src/general.tex @@ -71,7 +71,7 @@ Operators in expressions are not so constrained.\end{note} %\pnum -Table~1 shows the headers described in this document +\hyperref[tab:C++ library headers]{Table~1} shows the headers described in this document %%shall import the contents of %%\tcode{::std::experimental::concurrency::v2} into %%\tcode{::std::experimental::concurrency_v1} as if by: @@ -104,8 +104,16 @@ % \end{floattable} \rSec1[general.feature.test]{\textbf{Feature-testing recommendations}} +\label{tab:C++ library headers} %\pnum -An implementation that provides support for this document should define each feature test macro defined in Table~2 and Table~3 if no associated headers are indicated for that macro, and if associated headers are indicated for a macro, that macro is defined after inclusion of one of the corresponding headers specified in Table~2 and Table~3. +An implementation that provides support for this document should define each feature test macro defined in +\hyperref[Feature-test macros name]{Table~2} +and +\hyperref[Feature-test macros header]{Table~3} +if no associated headers are indicated for that macro, and if associated headers are indicated for a macro, that macro is defined after inclusion of one of the corresponding headers specified in +\hyperref[Feature-test macros name]{Table~2} +and +\hyperref[Feature-test macros header]{Table~3}. %%\begin{floattable}{\textbf{Feature-test macros name}}{tab:intro.features} %%{lllll} @@ -130,6 +138,7 @@ \begin{table}[htb] \centering \textbf{Table 2 \textemdash\ Feature-test macros name} +\label{Feature-test macros name} \vspace{0.1in} \begin{tabular}{|lll|} @@ -198,6 +207,39 @@ ~ +~ + +~ + +~ + +~ + +~ + +~ + +~ + +~ + +~ + +~ + +~ + +~ + +~ + +~ + +~ + +~ +\label{Feature-test macros header} + % \rSec1[general.plans]{Future plans (Informative)} % %\pnum % This clause describes tentative plans for future versions of this document and plans for moving content into diff --git a/src/ts.tex b/src/ts.tex index d684f65..3d023bb 100644 --- a/src/ts.tex +++ b/src/ts.tex @@ -28,6 +28,7 @@ \usepackage{xcolor} \usepackage[T1]{fontenc} \usepackage[pdftex, final]{graphicx} +\usepackage{pdfpages} \usepackage[pdftex, pdftitle={Programming Languages — Technical specification for /Cpp extensions for concurrency 2}, pdfsubject={C++ Concurrency Technical Specification 2}, From 2de5e5104703db3f5f49a1cb2431a488d582f1ae Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 1 Nov 2024 08:58:59 -0700 Subject: [PATCH 108/114] srHP: Number NOTEs per ISO editor direction Signed-off-by: Paul E. McKenney --- src/srHP.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/srHP.tex b/src/srHP.tex index a813a56..d965a17 100644 --- a/src/srHP.tex +++ b/src/srHP.tex @@ -433,7 +433,7 @@ \returns \tcode{old == ptr}. -NOTE It is possible for \tcode{try_protect} to return \tcode{true} when \tcode{ptr} is a null pointer. +NOTE 1 It is possible for \tcode{try_protect} to return \tcode{true} when \tcode{ptr} is a null pointer. %\pnum \complexity @@ -487,7 +487,7 @@ \effects Swaps the hazard pointer ownership of this object with that of other. -NOTE The owned hazard pointers, if any, remain unchanged during the swap and continue to be associated with the respective objects that they were protecting before the swap, if any. No protection epochs are ended or initiated. +NOTE 2 The owned hazard pointers, if any, remain unchanged during the swap and continue to be associated with the respective objects that they were protecting before the swap, if any. No protection epochs are ended or initiated. %\pnum \complexity From df41b6bb40e439b49308a58853ce2d8ca9a2282a Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 1 Nov 2024 09:02:38 -0700 Subject: [PATCH 109/114] srrcu: Add "General" section per ISO Editor direction Signed-off-by: Paul E. McKenney --- src/srrcu.tex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/srrcu.tex b/src/srrcu.tex index 0067ae8..fe0fa69 100644 --- a/src/srrcu.tex +++ b/src/srrcu.tex @@ -163,6 +163,8 @@ \rSec2[saferecl.rcu.domain]{Class \tcode{rcu_domain}} +\rSec3[saferecl.rcu.domain.general]{General} + % @@@ Removed the obsolete reference comments. This class meets the requirements of \oldconcept{BasicLockable} \CppXrefInAccord{32.2.5.2} and provides regions of RCU protection. From f736b7a58366705a27d571b2e5ce0f568b040d76 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sat, 2 Nov 2024 18:06:50 -0400 Subject: [PATCH 110/114] Update docno to 9922 in config --- src/config.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.tex b/src/config.tex index 6b5c357..16cb883 100644 --- a/src/config.tex +++ b/src/config.tex @@ -1,7 +1,7 @@ %!TEX root = ts.tex %%-------------------------------------------------- %% Version numbers -\newcommand{\docno}{} +\newcommand{\docno}{9922} \newcommand{\isodocno}{ISO/IEC DTS 9922:2024(E)} \newcommand{\prevdocno}{N4895;N4953;N4956;N4968} \newcommand{\cppver}{201703L @@@} %% MW: need update From b2642b183c1b27dc6a16450a0fbb2faefadac098 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sun, 3 Nov 2024 01:02:53 -0400 Subject: [PATCH 111/114] =?UTF-8?q?You,=20Now=20Going=20over=20the=20chang?= =?UTF-8?q?es:=20The=20links=20in=20the=20foreword=20are=20in=20the=20wron?= =?UTF-8?q?g=20font=20(it=20appears=20to=20be=20courier=20new)=20but=20the?= =?UTF-8?q?y=20should=20be=20in=20Cambria=20like=20the=20rest=20of=20the?= =?UTF-8?q?=20document,=20and=20in=20blue,=20not=20pink.=20---=20Foreword?= =?UTF-8?q?=20links=20still=20not=20in=20blue,=20changed=20DONE=20The=20fo?= =?UTF-8?q?oters=20need=20to=20be=20fixed=20=E2=80=93=20remove=20the=20sub?= =?UTF-8?q?clause=20and=20number=20heading=20from=20the=20footer=20?= =?UTF-8?q?=E2=80=93=20it=20should=20only=20have=20the=20copyright=20?= =?UTF-8?q?=E2=80=9C=C2=A9=20ISO/IEC=202024=20=E2=80=93=20All=20rights=20r?= =?UTF-8?q?eserved=E2=80=9D=20with=20the=20page=20number=20below=20---=20D?= =?UTF-8?q?ONE=20Please=20add=20hyperlinks=20to=20the=20cross-references?= =?UTF-8?q?=20to=20elements=20of=20this=20document=20throughout=20the=20te?= =?UTF-8?q?xt.=20For=20example,=20in=204.2=20and=204.3,=20the=20cross-refe?= =?UTF-8?q?rences=20to=20Tables=201,=202=20and=203=20should=20have=20a=20h?= =?UTF-8?q?yperlink=20that=20takes=20the=20user=20to=20the=20relevant=20ta?= =?UTF-8?q?ble.=20The=20same=20applies=20to=20all=20cross-references=20to?= =?UTF-8?q?=20subclauses=20(this=20has=20been=20done=20in=206.3.2=20for=20?= =?UTF-8?q?example).=20---=20DONE=20Please=20remove=20the=20=E2=80=9C?= =?UTF-8?q?=C2=A7=E2=80=9D=20symbol=20from=20all=20references=20to=20ISO/I?= =?UTF-8?q?EC=2014882,=20e.g.=20=E2=80=9CISO/IEC=2014882:2020,=204.1?= =?UTF-8?q?=E2=80=9D---2=20more=20in=20General=20still=20has=20this,=20upd?= =?UTF-8?q?ated=20DONE=20Are=20the=20page=20breaks=20between=20table=203?= =?UTF-8?q?=20and=20clause=205,=20and=205.4=20and=20clause=206=20necessary?= =?UTF-8?q?=3F=20---=20We=20have=20page=20breaks=20before=20each=20major?= =?UTF-8?q?=20section.=206.2.1:=20NOTE=203=20should=20be=20NOTE=202=20---?= =?UTF-8?q?=20That=20would=20give=20us=20two=20instances=20of=20"NOTE=202"?= =?UTF-8?q?=206.2.7.5:=20the=20first=20NOTE=20must=20be=20NOTE=201=20and?= =?UTF-8?q?=20the=20second=20NOTE,=20NOTE=202.=20---=20DONE=20Please=20che?= =?UTF-8?q?ck=20the=20size=20of=20the=20font=20of=20the=20NOTES=20througho?= =?UTF-8?q?ut=20the=20text.=20In=20most=20of=20the=20text=20(e.g.=206.2.7.?= =?UTF-8?q?5,=206.3,=20clauses=207=20and=208)=20the=20notes=20seems=20to?= =?UTF-8?q?=20be=20the=20same=20size=20as=20normal=20text.=20In=206.3.4.2?= =?UTF-8?q?=20they=20appear=20to=20be=20smaller=20(which=20is=20the=20conv?= =?UTF-8?q?ention=20used=20in=20ISO=20documents)=20---=20I=20dont=20see=20?= =?UTF-8?q?a=20note=20in=206.3.4.2,=20but=20all=20notes=20seems=20the=20sa?= =?UTF-8?q?me=20size=206.3.4=20is=20a=20hanging=20paragraph.=20as=20per=20?= =?UTF-8?q?ISO/IEC=20Directives=20Part=202,=2022.3.3:=20=E2=80=9CHanging?= =?UTF-8?q?=20paragraphs=E2=80=9D=20shall=20be=20avoided=20since=20referen?= =?UTF-8?q?ce=20to=20them=20is=20ambiguous.=20To=20fix=20this,=20please=20?= =?UTF-8?q?add=20a=20subclause=206.3.4.1=20=E2=80=9CGeneral=E2=80=9D=20=20?= =?UTF-8?q?to=20correct=20this.=20Update=20the=20existing=20subclauses=206?= =?UTF-8?q?.3.4.1=20and=206.3.4.2=20to=206.3.4.2=20and=206.3.4.3,=20respec?= =?UTF-8?q?tively.=20Kindly=20amend=20cross-references=20throughout.=20---?= =?UTF-8?q?=20DONE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/foreword.tex | 12 +++++++++--- src/general.tex | 4 ++-- src/ts.tex | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/foreword.tex b/src/foreword.tex index e34caaf..7a55144 100644 --- a/src/foreword.tex +++ b/src/foreword.tex @@ -1,16 +1,22 @@ %!TEX root = ts.tex \rSec0[foreword]{Foreword} +%%\hypersetup{colorlinks=true, linkcolor=blue, urlcolor=blue} ISO (the International Organization for Standardization) and IEC (the International Electrotechnical Commission) form the specialized system for worldwide standardization. National bodies that are members of ISO or IEC participate in the development of International Standards through technical committees established by the respective organization to deal with particular fields of technical activity. ISO and IEC technical committees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the work. -The procedures used to develop this document and those intended for its further maintenance are described in the ISO/IEC Directives, Part 1. In particular, the different approval criteria needed for the different types of document should be noted. This document was drafted in accordance with the editorial rules of the ISO/IEC Directives, Part 2 (see www.iso.org/directives or www.iec.ch/members_experts/refdocs). +The procedures used to develop this document and those intended for its further maintenance are described in the ISO/IEC Directives, Part 1. In particular, the different approval criteria needed for the different types of document should be noted. This document was drafted in accordance with the editorial rules of the ISO/IEC Directives, Part 2 (see \href{www.iso.org/directives}{www.iso.org/directives} +or +\href{www.iec.ch/members_experts/refdocs}{www.iec.ch/members_experts/refdocs}). -ISO and IEC draw attention to the possibility that the implementation of this document may involve the use of (a) patent(s). ISO and IEC take no position concerning the evidence, validity or applicability of any claimed patent rights in respect thereof. As of the date of publication of this document, ISO and IEC had not received notice of (a) patent(s) which may be required to implement this document. However, implementers are cautioned that this may not represent the latest information, which may be obtained from the patent database available at www.iso.org/patents and https://patents.iec.ch. ISO and IEC shall not be held responsible for identifying any or all such patent rights. +ISO and IEC draw attention to the possibility that the implementation of this document may involve the use of (a) patent(s). ISO and IEC take no position concerning the evidence, validity or applicability of any claimed patent rights in respect thereof. As of the date of publication of this document, ISO and IEC had not received notice of (a) patent(s) which may be required to implement this document. However, implementers are cautioned that this may not represent the latest information, which may be obtained from the patent database available at \href{www.iso.org/patents}{www.iso.org/patents} +and +\href{patents.iec.ch/}{patents.iec.ch}. +ISO and IEC shall not be held responsible for identifying any or all such patent rights. Any trade name used in this document is information given for the convenience of users and does not constitute an endorsement. -For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and expressions related to conformity assessment, as well as information about ISO's adherence to the World Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT) see www.iso.org/iso/foreword.html. In the IEC, see www.iec.ch/understanding-standards. +For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and expressions related to conformity assessment, as well as information about ISO's adherence to the World Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT) see \href{www.iso.org/iso/foreword.html/}{www.iso.org/iso/foreword.html}. In the IEC, see www.iec.ch/understanding-standards. This document was prepared by Joint Technical Committee ISO/IEC JTC 1, \emph{Information technology}, Subcommittee SC 22, \emph{Programming languages, their environments and system software interfaces}. diff --git a/src/general.tex b/src/general.tex index 0b3fe43..1f366e4 100644 --- a/src/general.tex +++ b/src/general.tex @@ -41,7 +41,7 @@ \rSec1[general.compliance]{Implementation compliance} %\pnum -Conformance requirements for this document are those defined in \CppXref{4.1}, as applied to a merged document consisting of ISO/IEC 14882:2020 amended by this document. +Conformance requirements for this document are those defined in 4.1, as applied to a merged document consisting of ISO/IEC 14882:2020 amended by this document. %%\begin{note} NOTE Conformance is defined in terms of the behaviour of programs.%%\end{note} @@ -60,7 +60,7 @@ Whenever an unqualified name is used in the specification of a declaration \tcode{D}, its meaning is established -in accordance with (\CppXref{4.1.2}) by performing unqualified name lookup +in accordance with 4.1.2 by performing unqualified name lookup in the context of \tcode{D}. \begin{note} Argument-dependent lookup is not performed.\end{note} diff --git a/src/ts.tex b/src/ts.tex index 3d023bb..8347e00 100644 --- a/src/ts.tex +++ b/src/ts.tex @@ -41,6 +41,7 @@ linktocpage=true, colorlinks=true, linkcolor=blue, + urlcolor=blue, plainpages=false ]{hyperref} \usepackage{memhfixc} % fix interactions between hyperref and memoir From 1b531f2d4d05d78fdfb69e6113d49fd559ba1e53 Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sun, 3 Nov 2024 01:06:44 -0400 Subject: [PATCH 112/114] 3 more hyperlinks fixed --- src/foreword.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/foreword.tex b/src/foreword.tex index 7a55144..4ca6103 100644 --- a/src/foreword.tex +++ b/src/foreword.tex @@ -16,8 +16,8 @@ Any trade name used in this document is information given for the convenience of users and does not constitute an endorsement. -For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and expressions related to conformity assessment, as well as information about ISO's adherence to the World Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT) see \href{www.iso.org/iso/foreword.html/}{www.iso.org/iso/foreword.html}. In the IEC, see www.iec.ch/understanding-standards. +For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and expressions related to conformity assessment, as well as information about ISO's adherence to the World Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT) see \href{www.iso.org/iso/foreword.html/}{www.iso.org/iso/foreword.html}. In the IEC, see \href{www.iec.ch/understanding-standards/}{www.iec.ch/understanding-standards}. This document was prepared by Joint Technical Committee ISO/IEC JTC 1, \emph{Information technology}, Subcommittee SC 22, \emph{Programming languages, their environments and system software interfaces}. -Any feedback or questions on this document should be directed to the user’s national standards body. A complete listing of these bodies can be found at www.iso.org/members.html and www.iec.ch/national-committees. +Any feedback or questions on this document should be directed to the user’s national standards body. A complete listing of these bodies can be found at \href{www.iso.org/members.html/}{www.iso.org/members.html} and \href{www.iec.ch/national-committees/}{www.iec.ch/national-committees}. From 1e846ed2a5f354291bca29fdd03643f233dac5ab Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sun, 3 Nov 2024 01:26:43 -0400 Subject: [PATCH 113/114] 2 more hyperlinks in terms and definitions --- src/cover-wd.tex | 2 +- src/general.tex | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cover-wd.tex b/src/cover-wd.tex index 230e4f3..e3f6ec5 100644 --- a/src/cover-wd.tex +++ b/src/cover-wd.tex @@ -17,7 +17,7 @@ \hline \vspace{0.05in} \large \textbf{Programming Languages — Technical specification for C++ Extensions for Concurrency 2} & \vspace{0.05in} \large \textsf{\textbf{Second edition}} \\ -\emph{C++ Extensions pour la concurrence} +\emph{Langages de programmation — Spécification technique pour les extensions C++ pour la concurrence 2} & \large \textsf{\textbf{2024-03}} \\ \vspace{5.2in} ~ & \\ \scriptsize \textsf{Reference number} diff --git a/src/general.tex b/src/general.tex index 1f366e4..1ac26ad 100644 --- a/src/general.tex +++ b/src/general.tex @@ -33,8 +33,8 @@ terminological databases for use in standardization at the following addresses: \begin{itemize} - \item IEC Electropedia: available at https://www.electropedia.org/ - \item ISO Online browsing platform: available at https://www.iso.org/obp + \item IEC Electropedia: available at \href{//www.electropedia.org/}{www.electropedia.org} + \item ISO Online browsing platform: available at \href{//www.iso.org/obp/}{www.iso.org/obp} \end{itemize} \rSec0[general]{General} From 8d09af3a94edf9268f650a430c45b075353381eb Mon Sep 17 00:00:00 2001 From: Michael Wong Date: Sun, 3 Nov 2024 01:30:11 -0400 Subject: [PATCH 114/114] updated french title --- src/cover-wd.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cover-wd.tex b/src/cover-wd.tex index e3f6ec5..c8d4433 100644 --- a/src/cover-wd.tex +++ b/src/cover-wd.tex @@ -17,7 +17,7 @@ \hline \vspace{0.05in} \large \textbf{Programming Languages — Technical specification for C++ Extensions for Concurrency 2} & \vspace{0.05in} \large \textsf{\textbf{Second edition}} \\ -\emph{Langages de programmation — Spécification technique pour les extensions C++ pour la concurrence 2} +\emph{Langages de programmation — Spécification technique pour les extensions C++ pour la Concurrence 2} & \large \textsf{\textbf{2024-03}} \\ \vspace{5.2in} ~ & \\ \scriptsize \textsf{Reference number}