Skip to content

Commit 44c6bcb

Browse files
[atomics.ref.generic] Exposition-only style for ptr
1 parent 9e980d2 commit 44c6bcb

File tree

1 file changed

+52
-52
lines changed

1 file changed

+52
-52
lines changed

source/threads.tex

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3200,7 +3200,7 @@
32003200
namespace std {
32013201
template<class T> struct atomic_ref {
32023202
private:
3203-
T* ptr; // \expos
3203+
T* @\exposid{ptr}@; // \expos
32043204

32053205
public:
32063206
using value_type = remove_cv_t<T>;
@@ -3239,18 +3239,18 @@
32393239

32403240
\pnum
32413241
An \tcode{atomic_ref} object applies atomic operations\iref{atomics.general} to
3242-
the object referenced by \tcode{*ptr} such that,
3242+
the object referenced by \tcode{*\exposid{ptr}} such that,
32433243
for the lifetime\iref{basic.life} of the \tcode{atomic_ref} object,
3244-
the object referenced by \tcode{*ptr} is an atomic object\iref{intro.races}.
3244+
the object referenced by \tcode{*\exposid{ptr}} is an atomic object\iref{intro.races}.
32453245

32463246
\pnum
32473247
The program is ill-formed if \tcode{is_trivially_copyable_v<T>} is \tcode{false}.
32483248

32493249
\pnum
3250-
The lifetime\iref{basic.life} of an object referenced by \tcode{*ptr}
3250+
The lifetime\iref{basic.life} of an object referenced by \tcode{*\exposid{ptr}}
32513251
shall exceed the lifetime of all \tcode{atomic_ref}s that reference the object.
32523252
While any \tcode{atomic_ref} instances exist
3253-
that reference the \tcode{*ptr} object,
3253+
that reference the \tcode{*\exposid{ptr}} object,
32543254
all accesses to that object shall exclusively occur
32553255
through those \tcode{atomic_ref} instances.
32563256
No subobject of the object referenced by \tcode{atomic_ref}
@@ -3390,7 +3390,7 @@
33903390

33913391
\pnum
33923392
\effects
3393-
Atomically replaces the value referenced by \tcode{*ptr}
3393+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}}
33943394
with the value of \tcode{desired}.
33953395
Memory is affected according to the value of \tcode{order}.
33963396
\end{itemdescr}
@@ -3439,7 +3439,7 @@
34393439

34403440
\pnum
34413441
\returns
3442-
Atomically returns the value referenced by \tcode{*ptr}.
3442+
Atomically returns the value referenced by \tcode{*\exposid{ptr}}.
34433443
\end{itemdescr}
34443444

34453445
\indexlibrarymember{operator \placeholder{type}}{atomic_ref}%
@@ -3472,14 +3472,14 @@
34723472

34733473
\pnum
34743474
\effects
3475-
Atomically replaces the value referenced by \tcode{*ptr}
3475+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}}
34763476
with \tcode{desired}.
34773477
Memory is affected according to the value of \tcode{order}.
34783478
This operation is an atomic read-modify-write operation\iref{intro.multithread}.
34793479

34803480
\pnum
34813481
\returns
3482-
Atomically returns the value referenced by \tcode{*ptr}
3482+
Atomically returns the value referenced by \tcode{*\exposid{ptr}}
34833483
immediately before the effects.
34843484
\end{itemdescr}
34853485

@@ -3521,9 +3521,9 @@
35213521
\effects
35223522
Retrieves the value in \tcode{expected}.
35233523
It then atomically compares the value representation of
3524-
the value referenced by \tcode{*ptr} for equality
3524+
the value referenced by \tcode{*\exposid{ptr}} for equality
35253525
with that previously retrieved from \tcode{expected},
3526-
and if \tcode{true}, replaces the value referenced by \tcode{*ptr}
3526+
and if \tcode{true}, replaces the value referenced by \tcode{*\exposid{ptr}}
35273527
with that in \tcode{desired}.
35283528
If and only if the comparison is \tcode{true},
35293529
memory is affected according to the value of \tcode{success}, and
@@ -3539,11 +3539,11 @@
35393539
If and only if the comparison is \tcode{false} then,
35403540
after the atomic operation,
35413541
the value in \tcode{expected} is replaced by
3542-
the value read from the value referenced by \tcode{*ptr}
3542+
the value read from the value referenced by \tcode{*\exposid{ptr}}
35433543
during the atomic comparison.
35443544
If the operation returns \tcode{true},
35453545
these operations are atomic read-modify-write operations\iref{intro.races}
3546-
on the value referenced by \tcode{*ptr}.
3546+
on the value referenced by \tcode{*\exposid{ptr}}.
35473547
Otherwise, these operations are atomic load operations on that memory.
35483548

35493549
\pnum
@@ -3554,7 +3554,7 @@
35543554
\remarks
35553555
A weak compare-and-exchange operation may fail spuriously.
35563556
That is, even when the contents of memory referred to
3557-
by \tcode{expected} and \tcode{ptr} are equal,
3557+
by \tcode{expected} and \exposid{ptr} are equal,
35583558
it may return \tcode{false} and
35593559
store back to \tcode{expected} the same memory contents
35603560
that were originally there.
@@ -3600,7 +3600,7 @@
36003600
\pnum
36013601
\remarks
36023602
This function is an atomic waiting operation\iref{atomics.wait}
3603-
on atomic object \tcode{*ptr}.
3603+
on atomic object \tcode{*\exposid{ptr}}.
36043604
\end{itemdescr}
36053605

36063606
\indexlibrarymember{notify_one}{atomic_ref<T>}%
@@ -3615,14 +3615,14 @@
36153615

36163616
\pnum
36173617
\effects
3618-
Unblocks the execution of at least one atomic waiting operation on \tcode{*ptr}
3618+
Unblocks the execution of at least one atomic waiting operation on \tcode{*\exposid{ptr}}
36193619
that is eligible to be unblocked\iref{atomics.wait} by this call,
36203620
if any such atomic waiting operations exist.
36213621

36223622
\pnum
36233623
\remarks
36243624
This function is an atomic notifying operation\iref{atomics.wait}
3625-
on atomic object \tcode{*ptr}.
3625+
on atomic object \tcode{*\exposid{ptr}}.
36263626
\end{itemdescr}
36273627

36283628
\indexlibrarymember{notify_all}{atomic_ref<T>}%
@@ -3637,13 +3637,13 @@
36373637

36383638
\pnum
36393639
\effects
3640-
Unblocks the execution of all atomic waiting operations on \tcode{*ptr}
3640+
Unblocks the execution of all atomic waiting operations on \tcode{*\exposid{ptr}}
36413641
that are eligible to be unblocked\iref{atomics.wait} by this call.
36423642

36433643
\pnum
36443644
\remarks
36453645
This function is an atomic notifying operation\iref{atomics.wait}
3646-
on atomic object \tcode{*ptr}.
3646+
on atomic object \tcode{*\exposid{ptr}}.
36473647
\end{itemdescr}
36483648

36493649
\indexlibrarymember{address}{atomic_ref<T>}%
@@ -3654,7 +3654,7 @@
36543654
\begin{itemdescr}
36553655
\pnum
36563656
\returns
3657-
\tcode{ptr}.
3657+
\exposid{ptr}.
36583658
\end{itemdescr}
36593659

36603660
\rSec3[atomics.ref.int]{Specializations for integral types}
@@ -3680,7 +3680,7 @@
36803680
namespace std {
36813681
template<> struct atomic_ref<@\placeholder{integral-type}@> {
36823682
private:
3683-
@\placeholder{integral-type}@* ptr; // \expos
3683+
@\placeholder{integral-type}@* @\exposid{ptr}@; // \expos
36843684

36853685
public:
36863686
using value_type = remove_cv_t<@\placeholder{integral-type}@>;
@@ -3786,15 +3786,15 @@
37863786

37873787
\pnum
37883788
\effects
3789-
Atomically replaces the value referenced by \tcode{*ptr} with
3790-
the result of the computation applied to the value referenced by \tcode{*ptr}
3789+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}} with
3790+
the result of the computation applied to the value referenced by \tcode{*\exposid{ptr}}
37913791
and the given operand.
37923792
Memory is affected according to the value of \tcode{order}.
37933793
These operations are atomic read-modify-write operations\iref{intro.races}.
37943794

37953795
\pnum
37963796
\returns
3797-
Atomically, the value referenced by \tcode{*ptr}
3797+
Atomically, the value referenced by \tcode{*\exposid{ptr}}
37983798
immediately before the effects.
37993799

38003800
\pnum
@@ -3836,17 +3836,17 @@
38363836

38373837
\pnum
38383838
\effects
3839-
Atomically replaces the value referenced by \tcode{*ptr}
3839+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}}
38403840
with the result of the computation applied to
3841-
the value referenced by \tcode{*ptr} and the given \tcode{operand}.
3841+
the value referenced by \tcode{*\exposid{ptr}} and the given \tcode{operand}.
38423842
Memory is affected according to the value of \tcode{order}.
38433843
These operations are atomic modify-write operations\iref{atomics.order}.
38443844

38453845
\pnum
38463846
\remarks
38473847
Except for \tcode{store_max} and \tcode{store_min},
38483848
for signed integer types,
3849-
the result is as if \tcode{*ptr} and parameters
3849+
the result is as if \tcode{*\exposid{ptr}} and parameters
38503850
were converted to their corresponding unsigned types,
38513851
the computation performed on those types, and
38523852
the result converted back to the signed type.
@@ -3856,7 +3856,7 @@
38563856
For \tcode{store_max} and \tcode{store_min},
38573857
the maximum and minimum computation is performed
38583858
as if by \tcode{max} and \tcode{min} algorithms\iref{alg.min.max}, respectively,
3859-
with \tcode{*ptr} and the first parameter as the arguments.
3859+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
38603860
\end{itemdescr}
38613861

38623862
\indexlibrarymember{operator+=}{atomic_ref<\placeholder{integral-type}>}%
@@ -3898,7 +3898,7 @@
38983898
namespace std {
38993899
template<> struct atomic_ref<@\placeholder{floating-point-type}@> {
39003900
private:
3901-
@\placeholder{floating-point-type}@* ptr; // \expos
3901+
@\placeholder{floating-point-type}@* @\exposid{ptr}@; // \expos
39023902

39033903
public:
39043904
using value_type = remove_cv_t<@\placeholder{floating-point-type}@>;
@@ -4009,15 +4009,15 @@
40094009

40104010
\pnum
40114011
\effects
4012-
Atomically replaces the value referenced by \tcode{*ptr} with
4013-
the result of the computation applied to the value referenced by \tcode{*ptr}
4012+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}} with
4013+
the result of the computation applied to the value referenced by \tcode{*\exposid{ptr}}
40144014
and the given operand.
40154015
Memory is affected according to the value of \tcode{order}.
40164016
These operations are atomic read-modify-write operations\iref{intro.races}.
40174017

40184018
\pnum
40194019
\returns
4020-
Atomically, the value referenced by \tcode{*ptr}
4020+
Atomically, the value referenced by \tcode{*\exposid{ptr}}
40214021
immediately before the effects.
40224022

40234023
\pnum
@@ -4038,27 +4038,27 @@
40384038
For \tcode{fetch_fmaximum} and \tcode{fetch_fminimum},
40394039
the maximum and minimum computation is performed
40404040
as if by \tcode{fmaximum} and \tcode{fminimum}, respectively,
4041-
with \tcode{*ptr} and the first parameter as the arguments.
4041+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
40424042
\item
40434043
For \tcode{fetch_fmaximum_num} and \tcode{fetch_fminimum_num},
40444044
the maximum and minimum computation is performed
40454045
as if by \tcode{fmaximum_num} and \tcode{fminimum_num}, respectively,
4046-
with \tcode{*ptr} and the first parameter as the arguments.
4046+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
40474047
\item
40484048
For \tcode{fetch_max} and \tcode{fetch_min},
40494049
the maximum and minimum computation is performed
40504050
as if by \tcode{fmaximum_num} and \tcode{fminimum_num}, respectively,
4051-
with \tcode{*ptr} and the first parameter as the arguments, except that:
4051+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments, except that:
40524052
\begin{itemize}
40534053
\item
4054-
If both arguments are NaN, an unspecified NaN value is stored at \tcode{*ptr}.
4054+
If both arguments are NaN, an unspecified NaN value is stored at \tcode{*\exposid{ptr}}.
40554055
\item
40564056
If exactly one argument is a NaN,
4057-
either the other argument or an unspecified NaN value is stored at \tcode{*ptr};
4057+
either the other argument or an unspecified NaN value is stored at \tcode{*\exposid{ptr}};
40584058
it is unspecified which.
40594059
\item
40604060
If the arguments are differently signed zeros,
4061-
which of these values is stored at \tcode{*ptr} is unspecified.
4061+
which of these values is stored at \tcode{*\exposid{ptr}} is unspecified.
40624062
\end{itemize}
40634063
\end{itemize}
40644064

@@ -4090,9 +4090,9 @@
40904090

40914091
\pnum
40924092
\effects
4093-
Atomically replaces the value referenced by \tcode{*ptr}
4093+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}}
40944094
with the result of the computation applied to
4095-
the value referenced by \tcode{*ptr} and the given \tcode{operand}.
4095+
the value referenced by \tcode{*\exposid{ptr}} and the given \tcode{operand}.
40964096
Memory is affected according to the value of \tcode{order}.
40974097
These operations are atomic modify-write operations\iref{atomics.order}.
40984098

@@ -4120,23 +4120,23 @@
41204120
For \tcode{store_fmaximum} and \tcode{store_fminimum},
41214121
the maximum and minimum computation is performed
41224122
as if by \tcode{fmaximum} and \tcode{fminimum}, respectively,
4123-
with \tcode{*ptr} and the first parameter as the arguments.
4123+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
41244124
\item
41254125
For \tcode{store_fmaximum_num} and \tcode{store_fminimum_num},
41264126
the maximum and minimum computation is performed
41274127
as if by \tcode{fmaximum_num }and \tcode{fminimum_num}, respectively,
4128-
with \tcode{*ptr} and the first parameter as the arguments.
4128+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
41294129
\item
41304130
For \tcode{store_max} and \tcode{store_min},
41314131
the maximum and minimum computation is performed
41324132
as if by \tcode{fmaximum_num} and \tcode{fminimum_num}, respectively,
4133-
with \tcode{*ptr} and the first parameter as the arguments, except that:
4133+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments, except that:
41344134
\begin{itemize}
41354135
\item
4136-
If both arguments are NaN, an unspecified NaN value is stored at \tcode{*ptr}.
4136+
If both arguments are NaN, an unspecified NaN value is stored at \tcode{*\exposid{ptr}}.
41374137
\item
41384138
If exactly one argument is a NaN,
4139-
either the other argument or an unspecified NaN value is stored at \tcode{*ptr},
4139+
either the other argument or an unspecified NaN value is stored at \tcode{*\exposid{ptr}},
41404140
it is unspecified which.
41414141
\item
41424142
If the arguments are differently signed zeros,
@@ -4186,7 +4186,7 @@
41864186
namespace std {
41874187
template<> struct atomic_ref<@\placeholder{pointer-type}@> {
41884188
private:
4189-
@\placeholder{pointer-type}@* ptr; // \expos
4189+
@\placeholder{pointer-type}@* @\exposid{ptr}@; // \expos
41904190

41914191
public:
41924192
using value_type = remove_cv_t<@\placeholder{pointer-type}@>;
@@ -4278,15 +4278,15 @@
42784278

42794279
\pnum
42804280
\effects
4281-
Atomically replaces the value referenced by \tcode{*ptr} with
4282-
the result of the computation applied to the value referenced by \tcode{*ptr}
4281+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}} with
4282+
the result of the computation applied to the value referenced by \tcode{*\exposid{ptr}}
42834283
and the given operand.
42844284
Memory is affected according to the value of \tcode{order}.
42854285
These operations are atomic read-modify-write operations\iref{intro.races}.
42864286

42874287
\pnum
42884288
\returns
4289-
Atomically, the value referenced by \tcode{*ptr}
4289+
Atomically, the value referenced by \tcode{*\exposid{ptr}}
42904290
immediately before the effects.
42914291

42924292
\pnum
@@ -4329,9 +4329,9 @@
43294329

43304330
\pnum
43314331
\effects
4332-
Atomically replaces the value referenced by \tcode{*ptr}
4332+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}}
43334333
with the result of the computation applied to
4334-
the value referenced by \tcode{*ptr} and the given \tcode{operand}.
4334+
the value referenced by \tcode{*\exposid{ptr}} and the given \tcode{operand}.
43354335
Memory is affected according to the value of \tcode{order}.
43364336
These operations are atomic modify-write operations\iref{atomics.order}.
43374337

@@ -4342,7 +4342,7 @@
43424342
For \tcode{store_max} and \tcode{store_min},
43434343
the \tcode{maximum} and \tcode{minimum} computation is performed
43444344
as if by \tcode{max} and \tcode{min} algorithms\iref{alg.min.max}, respectively,
4345-
with \tcode{*ptr} and the first parameter as the arguments.
4345+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
43464346
\begin{note}
43474347
If the pointers point to different complete objects (or subobjects thereof),
43484348
the \tcode{<} operator does not establish

0 commit comments

Comments
 (0)