Skip to content

Commit dd76b55

Browse files
[thread.latch.class] Exposition-only style for counter
1 parent 144d4e0 commit dd76b55

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

source/threads.tex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10697,7 +10697,7 @@
1069710697
void arrive_and_wait(ptrdiff_t update = 1);
1069810698

1069910699
private:
10700-
ptrdiff_t counter; // \expos
10700+
ptrdiff_t @\exposid{counter}@; // \expos
1070110701
};
1070210702
}
1070310703
\end{codeblock}
@@ -10720,7 +10720,7 @@
1072010720
\begin{itemdescr}
1072110721
\pnum
1072210722
\returns
10723-
The maximum value of \tcode{counter} that the implementation supports.
10723+
The maximum value of \exposid{counter} that the implementation supports.
1072410724
\end{itemdescr}
1072510725

1072610726
\indexlibraryctor{latch}%
@@ -10736,7 +10736,7 @@
1073610736

1073710737
\pnum
1073810738
\effects
10739-
Initializes \tcode{counter} with \tcode{expected}.
10739+
Initializes \exposid{counter} with \tcode{expected}.
1074010740

1074110741
\pnum
1074210742
\throws
@@ -10752,12 +10752,12 @@
1075210752
\pnum
1075310753
\expects
1075410754
\tcode{update >= 0} is \tcode{true}, and
10755-
\tcode{update <= counter} is \tcode{true}.
10755+
\tcode{update <= \exposid{counter}} is \tcode{true}.
1075610756

1075710757
\pnum
1075810758
\effects
10759-
Atomically decrements \tcode{counter} by \tcode{update}.
10760-
If \tcode{counter} is equal to zero,
10759+
Atomically decrements \exposid{counter} by \tcode{update}.
10760+
If \exposid{counter} is equal to zero,
1076110761
unblocks all threads blocked on \tcode{*this}.
1076210762

1076310763
\pnum
@@ -10782,7 +10782,7 @@
1078210782
\begin{itemdescr}
1078310783
\pnum
1078410784
\returns
10785-
With very low probability \tcode{false}. Otherwise \tcode{counter == 0}.
10785+
With very low probability \tcode{false}. Otherwise \tcode{\exposid{counter} == 0}.
1078610786
\end{itemdescr}
1078710787

1078810788
\indexlibrarymember{wait}{latch}%
@@ -10794,9 +10794,9 @@
1079410794
\pnum
1079510795
\indextext{block (execution)}%
1079610796
\effects
10797-
If \tcode{counter} equals zero, returns immediately.
10797+
If \exposid{counter} equals zero, returns immediately.
1079810798
Otherwise, blocks on \tcode{*this}
10799-
until a call to \tcode{count_down} that decrements \tcode{counter} to zero.
10799+
until a call to \tcode{count_down} that decrements \exposid{counter} to zero.
1080010800

1080110801
\pnum
1080210802
\throws

0 commit comments

Comments
 (0)