Skip to content

Commit f51190a

Browse files
[atomics.ref.generic] Exposition-only style for ptr
1 parent 1bbd739 commit f51190a

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
@@ -3202,7 +3202,7 @@
32023202
namespace std {
32033203
template<class T> struct atomic_ref {
32043204
private:
3205-
T* ptr; // \expos
3205+
T* @\exposid{ptr}@; // \expos
32063206

32073207
public:
32083208
using value_type = remove_cv_t<T>;
@@ -3241,18 +3241,18 @@
32413241

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

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

32513251
\pnum
3252-
The lifetime\iref{basic.life} of an object referenced by \tcode{*ptr}
3252+
The lifetime\iref{basic.life} of an object referenced by \tcode{*\exposid{ptr}}
32533253
shall exceed the lifetime of all \tcode{atomic_ref}s that reference the object.
32543254
While any \tcode{atomic_ref} instances exist
3255-
that reference the \tcode{*ptr} object,
3255+
that reference the \tcode{*\exposid{ptr}} object,
32563256
all accesses to that object shall exclusively occur
32573257
through those \tcode{atomic_ref} instances.
32583258
No subobject of the object referenced by \tcode{atomic_ref}
@@ -3392,7 +3392,7 @@
33923392

33933393
\pnum
33943394
\effects
3395-
Atomically replaces the value referenced by \tcode{*ptr}
3395+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}}
33963396
with the value of \tcode{desired}.
33973397
Memory is affected according to the value of \tcode{order}.
33983398
\end{itemdescr}
@@ -3441,7 +3441,7 @@
34413441

34423442
\pnum
34433443
\returns
3444-
Atomically returns the value referenced by \tcode{*ptr}.
3444+
Atomically returns the value referenced by \tcode{*\exposid{ptr}}.
34453445
\end{itemdescr}
34463446

34473447
\indexlibrarymember{operator \placeholder{type}}{atomic_ref}%
@@ -3474,14 +3474,14 @@
34743474

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

34823482
\pnum
34833483
\returns
3484-
Atomically returns the value referenced by \tcode{*ptr}
3484+
Atomically returns the value referenced by \tcode{*\exposid{ptr}}
34853485
immediately before the effects.
34863486
\end{itemdescr}
34873487

@@ -3523,9 +3523,9 @@
35233523
\effects
35243524
Retrieves the value in \tcode{expected}.
35253525
It then atomically compares the value representation of
3526-
the value referenced by \tcode{*ptr} for equality
3526+
the value referenced by \tcode{*\exposid{ptr}} for equality
35273527
with that previously retrieved from \tcode{expected},
3528-
and if \tcode{true}, replaces the value referenced by \tcode{*ptr}
3528+
and if \tcode{true}, replaces the value referenced by \tcode{*\exposid{ptr}}
35293529
with that in \tcode{desired}.
35303530
If and only if the comparison is \tcode{true},
35313531
memory is affected according to the value of \tcode{success}, and
@@ -3541,11 +3541,11 @@
35413541
If and only if the comparison is \tcode{false} then,
35423542
after the atomic operation,
35433543
the value in \tcode{expected} is replaced by
3544-
the value read from the value referenced by \tcode{*ptr}
3544+
the value read from the value referenced by \tcode{*\exposid{ptr}}
35453545
during the atomic comparison.
35463546
If the operation returns \tcode{true},
35473547
these operations are atomic read-modify-write operations\iref{intro.races}
3548-
on the value referenced by \tcode{*ptr}.
3548+
on the value referenced by \tcode{*\exposid{ptr}}.
35493549
Otherwise, these operations are atomic load operations on that memory.
35503550

35513551
\pnum
@@ -3556,7 +3556,7 @@
35563556
\remarks
35573557
A weak compare-and-exchange operation may fail spuriously.
35583558
That is, even when the contents of memory referred to
3559-
by \tcode{expected} and \tcode{ptr} are equal,
3559+
by \tcode{expected} and \exposid{ptr} are equal,
35603560
it may return \tcode{false} and
35613561
store back to \tcode{expected} the same memory contents
35623562
that were originally there.
@@ -3602,7 +3602,7 @@
36023602
\pnum
36033603
\remarks
36043604
This function is an atomic waiting operation\iref{atomics.wait}
3605-
on atomic object \tcode{*ptr}.
3605+
on atomic object \tcode{*\exposid{ptr}}.
36063606
\end{itemdescr}
36073607

36083608
\indexlibrarymember{notify_one}{atomic_ref<T>}%
@@ -3617,14 +3617,14 @@
36173617

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

36243624
\pnum
36253625
\remarks
36263626
This function is an atomic notifying operation\iref{atomics.wait}
3627-
on atomic object \tcode{*ptr}.
3627+
on atomic object \tcode{*\exposid{ptr}}.
36283628
\end{itemdescr}
36293629

36303630
\indexlibrarymember{notify_all}{atomic_ref<T>}%
@@ -3639,13 +3639,13 @@
36393639

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

36453645
\pnum
36463646
\remarks
36473647
This function is an atomic notifying operation\iref{atomics.wait}
3648-
on atomic object \tcode{*ptr}.
3648+
on atomic object \tcode{*\exposid{ptr}}.
36493649
\end{itemdescr}
36503650

36513651
\indexlibrarymember{address}{atomic_ref<T>}%
@@ -3656,7 +3656,7 @@
36563656
\begin{itemdescr}
36573657
\pnum
36583658
\returns
3659-
\tcode{ptr}.
3659+
\exposid{ptr}.
36603660
\end{itemdescr}
36613661

36623662
\rSec3[atomics.ref.int]{Specializations for integral types}
@@ -3682,7 +3682,7 @@
36823682
namespace std {
36833683
template<> struct atomic_ref<@\placeholder{integral-type}@> {
36843684
private:
3685-
@\placeholder{integral-type}@* ptr; // \expos
3685+
@\placeholder{integral-type}@* @\exposid{ptr}@; // \expos
36863686

36873687
public:
36883688
using value_type = remove_cv_t<@\placeholder{integral-type}@>;
@@ -3788,15 +3788,15 @@
37883788

37893789
\pnum
37903790
\effects
3791-
Atomically replaces the value referenced by \tcode{*ptr} with
3792-
the result of the computation applied to the value referenced by \tcode{*ptr}
3791+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}} with
3792+
the result of the computation applied to the value referenced by \tcode{*\exposid{ptr}}
37933793
and the given operand.
37943794
Memory is affected according to the value of \tcode{order}.
37953795
These operations are atomic read-modify-write operations\iref{intro.races}.
37963796

37973797
\pnum
37983798
\returns
3799-
Atomically, the value referenced by \tcode{*ptr}
3799+
Atomically, the value referenced by \tcode{*\exposid{ptr}}
38003800
immediately before the effects.
38013801

38023802
\pnum
@@ -3838,17 +3838,17 @@
38383838

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

38473847
\pnum
38483848
\remarks
38493849
Except for \tcode{store_max} and \tcode{store_min},
38503850
for signed integer types,
3851-
the result is as if \tcode{*ptr} and parameters
3851+
the result is as if \tcode{*\exposid{ptr}} and parameters
38523852
were converted to their corresponding unsigned types,
38533853
the computation performed on those types, and
38543854
the result converted back to the signed type.
@@ -3858,7 +3858,7 @@
38583858
For \tcode{store_max} and \tcode{store_min},
38593859
the maximum and minimum computation is performed
38603860
as if by \tcode{max} and \tcode{min} algorithms\iref{alg.min.max}, respectively,
3861-
with \tcode{*ptr} and the first parameter as the arguments.
3861+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
38623862
\end{itemdescr}
38633863

38643864
\indexlibrarymember{operator+=}{atomic_ref<\placeholder{integral-type}>}%
@@ -3900,7 +3900,7 @@
39003900
namespace std {
39013901
template<> struct atomic_ref<@\placeholder{floating-point-type}@> {
39023902
private:
3903-
@\placeholder{floating-point-type}@* ptr; // \expos
3903+
@\placeholder{floating-point-type}@* @\exposid{ptr}@; // \expos
39043904

39053905
public:
39063906
using value_type = remove_cv_t<@\placeholder{floating-point-type}@>;
@@ -4011,15 +4011,15 @@
40114011

40124012
\pnum
40134013
\effects
4014-
Atomically replaces the value referenced by \tcode{*ptr} with
4015-
the result of the computation applied to the value referenced by \tcode{*ptr}
4014+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}} with
4015+
the result of the computation applied to the value referenced by \tcode{*\exposid{ptr}}
40164016
and the given operand.
40174017
Memory is affected according to the value of \tcode{order}.
40184018
These operations are atomic read-modify-write operations\iref{intro.races}.
40194019

40204020
\pnum
40214021
\returns
4022-
Atomically, the value referenced by \tcode{*ptr}
4022+
Atomically, the value referenced by \tcode{*\exposid{ptr}}
40234023
immediately before the effects.
40244024

40254025
\pnum
@@ -4040,27 +4040,27 @@
40404040
For \tcode{fetch_fmaximum} and \tcode{fetch_fminimum},
40414041
the maximum and minimum computation is performed
40424042
as if by \tcode{fmaximum} and \tcode{fminimum}, respectively,
4043-
with \tcode{*ptr} and the first parameter as the arguments.
4043+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
40444044
\item
40454045
For \tcode{fetch_fmaximum_num} and \tcode{fetch_fminimum_num},
40464046
the maximum and minimum computation is performed
40474047
as if by \tcode{fmaximum_num} and \tcode{fminimum_num}, respectively,
4048-
with \tcode{*ptr} and the first parameter as the arguments.
4048+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
40494049
\item
40504050
For \tcode{fetch_max} and \tcode{fetch_min},
40514051
the maximum and minimum computation is performed
40524052
as if by \tcode{fmaximum_num} and \tcode{fminimum_num}, respectively,
4053-
with \tcode{*ptr} and the first parameter as the arguments, except that:
4053+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments, except that:
40544054
\begin{itemize}
40554055
\item
4056-
If both arguments are NaN, an unspecified NaN value is stored at \tcode{*ptr}.
4056+
If both arguments are NaN, an unspecified NaN value is stored at \tcode{*\exposid{ptr}}.
40574057
\item
40584058
If exactly one argument is a NaN,
4059-
either the other argument or an unspecified NaN value is stored at \tcode{*ptr};
4059+
either the other argument or an unspecified NaN value is stored at \tcode{*\exposid{ptr}};
40604060
it is unspecified which.
40614061
\item
40624062
If the arguments are differently signed zeros,
4063-
which of these values is stored at \tcode{*ptr} is unspecified.
4063+
which of these values is stored at \tcode{*\exposid{ptr}} is unspecified.
40644064
\end{itemize}
40654065
\end{itemize}
40664066

@@ -4092,9 +4092,9 @@
40924092

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

@@ -4122,23 +4122,23 @@
41224122
For \tcode{store_fmaximum} and \tcode{store_fminimum},
41234123
the maximum and minimum computation is performed
41244124
as if by \tcode{fmaximum} and \tcode{fminimum}, respectively,
4125-
with \tcode{*ptr} and the first parameter as the arguments.
4125+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
41264126
\item
41274127
For \tcode{store_fmaximum_num} and \tcode{store_fminimum_num},
41284128
the maximum and minimum computation is performed
41294129
as if by \tcode{fmaximum_num }and \tcode{fminimum_num}, respectively,
4130-
with \tcode{*ptr} and the first parameter as the arguments.
4130+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
41314131
\item
41324132
For \tcode{store_max} and \tcode{store_min},
41334133
the maximum and minimum computation is performed
41344134
as if by \tcode{fmaximum_num} and \tcode{fminimum_num}, respectively,
4135-
with \tcode{*ptr} and the first parameter as the arguments, except that:
4135+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments, except that:
41364136
\begin{itemize}
41374137
\item
4138-
If both arguments are NaN, an unspecified NaN value is stored at \tcode{*ptr}.
4138+
If both arguments are NaN, an unspecified NaN value is stored at \tcode{*\exposid{ptr}}.
41394139
\item
41404140
If exactly one argument is a NaN,
4141-
either the other argument or an unspecified NaN value is stored at \tcode{*ptr},
4141+
either the other argument or an unspecified NaN value is stored at \tcode{*\exposid{ptr}},
41424142
it is unspecified which.
41434143
\item
41444144
If the arguments are differently signed zeros,
@@ -4188,7 +4188,7 @@
41884188
namespace std {
41894189
template<class T> struct atomic_ref<@\placeholder{pointer-type}@> {
41904190
private:
4191-
@\placeholder{pointer-type}@* ptr; // \expos
4191+
@\placeholder{pointer-type}@* @\exposid{ptr}@; // \expos
41924192

41934193
public:
41944194
using value_type = remove_cv_t<@\placeholder{pointer-type}@>;
@@ -4280,15 +4280,15 @@
42804280

42814281
\pnum
42824282
\effects
4283-
Atomically replaces the value referenced by \tcode{*ptr} with
4284-
the result of the computation applied to the value referenced by \tcode{*ptr}
4283+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}} with
4284+
the result of the computation applied to the value referenced by \tcode{*\exposid{ptr}}
42854285
and the given operand.
42864286
Memory is affected according to the value of \tcode{order}.
42874287
These operations are atomic read-modify-write operations\iref{intro.races}.
42884288

42894289
\pnum
42904290
\returns
4291-
Atomically, the value referenced by \tcode{*ptr}
4291+
Atomically, the value referenced by \tcode{*\exposid{ptr}}
42924292
immediately before the effects.
42934293

42944294
\pnum
@@ -4331,9 +4331,9 @@
43314331

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

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

0 commit comments

Comments
 (0)