Skip to content

Commit bdd446e

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

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
@@ -3150,7 +3150,7 @@
31503150
namespace std {
31513151
template<class T> struct atomic_ref {
31523152
private:
3153-
T* ptr; // \expos
3153+
T* @\exposid{ptr}@; // \expos
31543154

31553155
public:
31563156
using value_type = remove_cv_t<T>;
@@ -3191,18 +3191,18 @@
31913191

31923192
\pnum
31933193
An \tcode{atomic_ref} object applies atomic operations\iref{atomics.general} to
3194-
the object referenced by \tcode{*ptr} such that,
3194+
the object referenced by \tcode{*\exposid{ptr}} such that,
31953195
for the lifetime\iref{basic.life} of the \tcode{atomic_ref} object,
3196-
the object referenced by \tcode{*ptr} is an atomic object\iref{intro.races}.
3196+
the object referenced by \tcode{*\exposid{ptr}} is an atomic object\iref{intro.races}.
31973197

31983198
\pnum
31993199
The program is ill-formed if \tcode{is_trivially_copyable_v<T>} is \tcode{false}.
32003200

32013201
\pnum
3202-
The lifetime\iref{basic.life} of an object referenced by \tcode{*ptr}
3202+
The lifetime\iref{basic.life} of an object referenced by \tcode{*\exposid{ptr}}
32033203
shall exceed the lifetime of all \tcode{atomic_ref}s that reference the object.
32043204
While any \tcode{atomic_ref} instances exist
3205-
that reference the \tcode{*ptr} object,
3205+
that reference the \tcode{*\exposid{ptr}} object,
32063206
all accesses to that object shall exclusively occur
32073207
through those \tcode{atomic_ref} instances.
32083208
No subobject of the object referenced by \tcode{atomic_ref}
@@ -3356,7 +3356,7 @@
33563356

33573357
\pnum
33583358
\effects
3359-
Atomically replaces the value referenced by \tcode{*ptr}
3359+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}}
33603360
with the value of \tcode{desired}.
33613361
Memory is affected according to the value of \tcode{order}.
33623362
\end{itemdescr}
@@ -3405,7 +3405,7 @@
34053405

34063406
\pnum
34073407
\returns
3408-
Atomically returns the value referenced by \tcode{*ptr}.
3408+
Atomically returns the value referenced by \tcode{*\exposid{ptr}}.
34093409
\end{itemdescr}
34103410

34113411
\indexlibrarymember{operator \placeholder{type}}{atomic_ref}%
@@ -3438,14 +3438,14 @@
34383438

34393439
\pnum
34403440
\effects
3441-
Atomically replaces the value referenced by \tcode{*ptr}
3441+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}}
34423442
with \tcode{desired}.
34433443
Memory is affected according to the value of \tcode{order}.
34443444
This operation is an atomic read-modify-write operation\iref{intro.multithread}.
34453445

34463446
\pnum
34473447
\returns
3448-
Atomically returns the value referenced by \tcode{*ptr}
3448+
Atomically returns the value referenced by \tcode{*\exposid{ptr}}
34493449
immediately before the effects.
34503450
\end{itemdescr}
34513451

@@ -3487,9 +3487,9 @@
34873487
\effects
34883488
Retrieves the value in \tcode{expected}.
34893489
It then atomically compares the value representation of
3490-
the value referenced by \tcode{*ptr} for equality
3490+
the value referenced by \tcode{*\exposid{ptr}} for equality
34913491
with that previously retrieved from \tcode{expected},
3492-
and if \tcode{true}, replaces the value referenced by \tcode{*ptr}
3492+
and if \tcode{true}, replaces the value referenced by \tcode{*\exposid{ptr}}
34933493
with that in \tcode{desired}.
34943494
If and only if the comparison is \tcode{true},
34953495
memory is affected according to the value of \tcode{success}, and
@@ -3505,11 +3505,11 @@
35053505
If and only if the comparison is \tcode{false} then,
35063506
after the atomic operation,
35073507
the value in \tcode{expected} is replaced by
3508-
the value read from the value referenced by \tcode{*ptr}
3508+
the value read from the value referenced by \tcode{*\exposid{ptr}}
35093509
during the atomic comparison.
35103510
If the operation returns \tcode{true},
35113511
these operations are atomic read-modify-write operations\iref{intro.races}
3512-
on the value referenced by \tcode{*ptr}.
3512+
on the value referenced by \tcode{*\exposid{ptr}}.
35133513
Otherwise, these operations are atomic load operations on that memory.
35143514

35153515
\pnum
@@ -3520,7 +3520,7 @@
35203520
\remarks
35213521
A weak compare-and-exchange operation may fail spuriously.
35223522
That is, even when the contents of memory referred to
3523-
by \tcode{expected} and \tcode{ptr} are equal,
3523+
by \tcode{expected} and \exposid{ptr} are equal,
35243524
it may return \tcode{false} and
35253525
store back to \tcode{expected} the same memory contents
35263526
that were originally there.
@@ -3566,7 +3566,7 @@
35663566
\pnum
35673567
\remarks
35683568
This function is an atomic waiting operation\iref{atomics.wait}
3569-
on atomic object \tcode{*ptr}.
3569+
on atomic object \tcode{*\exposid{ptr}}.
35703570
\end{itemdescr}
35713571

35723572
\indexlibrarymember{notify_one}{atomic_ref<T>}%
@@ -3581,14 +3581,14 @@
35813581

35823582
\pnum
35833583
\effects
3584-
Unblocks the execution of at least one atomic waiting operation on \tcode{*ptr}
3584+
Unblocks the execution of at least one atomic waiting operation on \tcode{*\exposid{ptr}}
35853585
that is eligible to be unblocked\iref{atomics.wait} by this call,
35863586
if any such atomic waiting operations exist.
35873587

35883588
\pnum
35893589
\remarks
35903590
This function is an atomic notifying operation\iref{atomics.wait}
3591-
on atomic object \tcode{*ptr}.
3591+
on atomic object \tcode{*\exposid{ptr}}.
35923592
\end{itemdescr}
35933593

35943594
\indexlibrarymember{notify_all}{atomic_ref<T>}%
@@ -3603,13 +3603,13 @@
36033603

36043604
\pnum
36053605
\effects
3606-
Unblocks the execution of all atomic waiting operations on \tcode{*ptr}
3606+
Unblocks the execution of all atomic waiting operations on \tcode{*\exposid{ptr}}
36073607
that are eligible to be unblocked\iref{atomics.wait} by this call.
36083608

36093609
\pnum
36103610
\remarks
36113611
This function is an atomic notifying operation\iref{atomics.wait}
3612-
on atomic object \tcode{*ptr}.
3612+
on atomic object \tcode{*\exposid{ptr}}.
36133613
\end{itemdescr}
36143614

36153615
\indexlibrarymember{address}{atomic_ref<T>}%
@@ -3620,7 +3620,7 @@
36203620
\begin{itemdescr}
36213621
\pnum
36223622
\returns
3623-
\tcode{ptr}.
3623+
\exposid{ptr}.
36243624
\end{itemdescr}
36253625

36263626
\rSec3[atomics.ref.int]{Specializations for integral types}
@@ -3646,7 +3646,7 @@
36463646
namespace std {
36473647
template<> struct atomic_ref<@\placeholder{integral-type}@> {
36483648
private:
3649-
@\placeholder{integral-type}@* ptr; // \expos
3649+
@\placeholder{integral-type}@* @\exposid{ptr}@; // \expos
36503650

36513651
public:
36523652
using value_type = remove_cv_t<@\placeholder{integral-type}@>;
@@ -3754,15 +3754,15 @@
37543754

37553755
\pnum
37563756
\effects
3757-
Atomically replaces the value referenced by \tcode{*ptr} with
3758-
the result of the computation applied to the value referenced by \tcode{*ptr}
3757+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}} with
3758+
the result of the computation applied to the value referenced by \tcode{*\exposid{ptr}}
37593759
and the given operand.
37603760
Memory is affected according to the value of \tcode{order}.
37613761
These operations are atomic read-modify-write operations\iref{intro.races}.
37623762

37633763
\pnum
37643764
\returns
3765-
Atomically, the value referenced by \tcode{*ptr}
3765+
Atomically, the value referenced by \tcode{*\exposid{ptr}}
37663766
immediately before the effects.
37673767

37683768
\pnum
@@ -3808,17 +3808,17 @@
38083808

38093809
\pnum
38103810
\effects
3811-
Atomically replaces the value referenced by \tcode{*ptr}
3811+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}}
38123812
with the result of the computation applied to
3813-
the value referenced by \tcode{*ptr} and the given \tcode{operand}.
3813+
the value referenced by \tcode{*\exposid{ptr}} and the given \tcode{operand}.
38143814
Memory is affected according to the value of \tcode{order}.
38153815
These operations are atomic modify-write operations\iref{atomics.order}.
38163816

38173817
\pnum
38183818
\remarks
38193819
Except for \tcode{store_max} and \tcode{store_min},
38203820
for signed integer types,
3821-
the result is as if \tcode{*ptr} and parameters
3821+
the result is as if \tcode{*\exposid{ptr}} and parameters
38223822
were converted to their corresponding unsigned types,
38233823
the computation performed on those types, and
38243824
the result converted back to the signed type.
@@ -3828,7 +3828,7 @@
38283828
For \tcode{store_max} and \tcode{store_min},
38293829
the maximum and minimum computation is performed
38303830
as if by \tcode{max} and \tcode{min} algorithms\iref{alg.min.max}, respectively,
3831-
with \tcode{*ptr} and the first parameter as the arguments.
3831+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
38323832
\end{itemdescr}
38333833

38343834
\indexlibrarymember{operator+=}{atomic_ref<\placeholder{integral-type}>}%
@@ -3870,7 +3870,7 @@
38703870
namespace std {
38713871
template<> struct atomic_ref<@\placeholder{floating-point-type}@> {
38723872
private:
3873-
@\placeholder{floating-point-type}@* ptr; // \expos
3873+
@\placeholder{floating-point-type}@* @\exposid{ptr}@; // \expos
38743874

38753875
public:
38763876
using value_type = remove_cv_t<@\placeholder{floating-point-type}@>;
@@ -3983,15 +3983,15 @@
39833983

39843984
\pnum
39853985
\effects
3986-
Atomically replaces the value referenced by \tcode{*ptr} with
3987-
the result of the computation applied to the value referenced by \tcode{*ptr}
3986+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}} with
3987+
the result of the computation applied to the value referenced by \tcode{*\exposid{ptr}}
39883988
and the given operand.
39893989
Memory is affected according to the value of \tcode{order}.
39903990
These operations are atomic read-modify-write operations\iref{intro.races}.
39913991

39923992
\pnum
39933993
\returns
3994-
Atomically, the value referenced by \tcode{*ptr}
3994+
Atomically, the value referenced by \tcode{*\exposid{ptr}}
39953995
immediately before the effects.
39963996

39973997
\pnum
@@ -4012,27 +4012,27 @@
40124012
For \tcode{fetch_fmaximum} and \tcode{fetch_fminimum},
40134013
the maximum and minimum computation is performed
40144014
as if by \tcode{fmaximum} and \tcode{fminimum}, respectively,
4015-
with \tcode{*ptr} and the first parameter as the arguments.
4015+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
40164016
\item
40174017
For \tcode{fetch_fmaximum_num} and \tcode{fetch_fminimum_num},
40184018
the maximum and minimum computation is performed
40194019
as if by \tcode{fmaximum_num} and \tcode{fminimum_num}, respectively,
4020-
with \tcode{*ptr} and the first parameter as the arguments.
4020+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
40214021
\item
40224022
For \tcode{fetch_max} and \tcode{fetch_min},
40234023
the maximum and minimum computation is performed
40244024
as if by \tcode{fmaximum_num} and \tcode{fminimum_num}, respectively,
4025-
with \tcode{*ptr} and the first parameter as the arguments, except that:
4025+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments, except that:
40264026
\begin{itemize}
40274027
\item
4028-
If both arguments are NaN, an unspecified NaN value is stored at \tcode{*ptr}.
4028+
If both arguments are NaN, an unspecified NaN value is stored at \tcode{*\exposid{ptr}}.
40294029
\item
40304030
If exactly one argument is a NaN,
4031-
either the other argument or an unspecified NaN value is stored at \tcode{*ptr};
4031+
either the other argument or an unspecified NaN value is stored at \tcode{*\exposid{ptr}};
40324032
it is unspecified which.
40334033
\item
40344034
If the arguments are differently signed zeros,
4035-
which of these values is stored at \tcode{*ptr} is unspecified.
4035+
which of these values is stored at \tcode{*\exposid{ptr}} is unspecified.
40364036
\end{itemize}
40374037
\end{itemize}
40384038

@@ -4068,9 +4068,9 @@
40684068

40694069
\pnum
40704070
\effects
4071-
Atomically replaces the value referenced by \tcode{*ptr}
4071+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}}
40724072
with the result of the computation applied to
4073-
the value referenced by \tcode{*ptr} and the given \tcode{operand}.
4073+
the value referenced by \tcode{*\exposid{ptr}} and the given \tcode{operand}.
40744074
Memory is affected according to the value of \tcode{order}.
40754075
These operations are atomic modify-write operations\iref{atomics.order}.
40764076

@@ -4098,23 +4098,23 @@
40984098
For \tcode{store_fmaximum} and \tcode{store_fminimum},
40994099
the maximum and minimum computation is performed
41004100
as if by \tcode{fmaximum} and \tcode{fminimum}, respectively,
4101-
with \tcode{*ptr} and the first parameter as the arguments.
4101+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
41024102
\item
41034103
For \tcode{store_fmaximum_num} and \tcode{store_fminimum_num},
41044104
the maximum and minimum computation is performed
41054105
as if by \tcode{fmaximum_num }and \tcode{fminimum_num}, respectively,
4106-
with \tcode{*ptr} and the first parameter as the arguments.
4106+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
41074107
\item
41084108
For \tcode{store_max} and \tcode{store_min},
41094109
the maximum and minimum computation is performed
41104110
as if by \tcode{fmaximum_num} and \tcode{fminimum_num}, respectively,
4111-
with \tcode{*ptr} and the first parameter as the arguments, except that:
4111+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments, except that:
41124112
\begin{itemize}
41134113
\item
4114-
If both arguments are NaN, an unspecified NaN value is stored at \tcode{*ptr}.
4114+
If both arguments are NaN, an unspecified NaN value is stored at \tcode{*\exposid{ptr}}.
41154115
\item
41164116
If exactly one argument is a NaN,
4117-
either the other argument or an unspecified NaN value is stored at \tcode{*ptr},
4117+
either the other argument or an unspecified NaN value is stored at \tcode{*\exposid{ptr}},
41184118
it is unspecified which.
41194119
\item
41204120
If the arguments are differently signed zeros,
@@ -4164,7 +4164,7 @@
41644164
namespace std {
41654165
template<> struct atomic_ref<@\placeholder{pointer-type}@> {
41664166
private:
4167-
@\placeholder{pointer-type}@* ptr; // \expos
4167+
@\placeholder{pointer-type}@* @\exposid{ptr}@; // \expos
41684168

41694169
public:
41704170
using value_type = remove_cv_t<@\placeholder{pointer-type}@>;
@@ -4258,15 +4258,15 @@
42584258

42594259
\pnum
42604260
\effects
4261-
Atomically replaces the value referenced by \tcode{*ptr} with
4262-
the result of the computation applied to the value referenced by \tcode{*ptr}
4261+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}} with
4262+
the result of the computation applied to the value referenced by \tcode{*\exposid{ptr}}
42634263
and the given operand.
42644264
Memory is affected according to the value of \tcode{order}.
42654265
These operations are atomic read-modify-write operations\iref{intro.races}.
42664266

42674267
\pnum
42684268
\returns
4269-
Atomically, the value referenced by \tcode{*ptr}
4269+
Atomically, the value referenced by \tcode{*\exposid{ptr}}
42704270
immediately before the effects.
42714271

42724272
\pnum
@@ -4313,9 +4313,9 @@
43134313

43144314
\pnum
43154315
\effects
4316-
Atomically replaces the value referenced by \tcode{*ptr}
4316+
Atomically replaces the value referenced by \tcode{*\exposid{ptr}}
43174317
with the result of the computation applied to
4318-
the value referenced by \tcode{*ptr} and the given \tcode{operand}.
4318+
the value referenced by \tcode{*\exposid{ptr}} and the given \tcode{operand}.
43194319
Memory is affected according to the value of \tcode{order}.
43204320
These operations are atomic modify-write operations\iref{atomics.order}.
43214321

@@ -4326,7 +4326,7 @@
43264326
For \tcode{store_max} and \tcode{store_min},
43274327
the \tcode{maximum} and \tcode{minimum} computation is performed
43284328
as if by \tcode{max} and \tcode{min} algorithms\iref{alg.min.max}, respectively,
4329-
with \tcode{*ptr} and the first parameter as the arguments.
4329+
with \tcode{*\exposid{ptr}} and the first parameter as the arguments.
43304330
\begin{note}
43314331
If the pointers point to different complete objects (or subobjects thereof),
43324332
the \tcode{<} operator does not establish

0 commit comments

Comments
 (0)