Skip to content

Commit 6aff360

Browse files
[thread.latch.class] Exposition-only style for counter
1 parent 3db3328 commit 6aff360

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
@@ -10722,7 +10722,7 @@
1072210722
void arrive_and_wait(ptrdiff_t update = 1);
1072310723

1072410724
private:
10725-
ptrdiff_t counter; // \expos
10725+
ptrdiff_t @\exposid{counter}@; // \expos
1072610726
};
1072710727
}
1072810728
\end{codeblock}
@@ -10745,7 +10745,7 @@
1074510745
\begin{itemdescr}
1074610746
\pnum
1074710747
\returns
10748-
The maximum value of \tcode{counter} that the implementation supports.
10748+
The maximum value of \exposid{counter} that the implementation supports.
1074910749
\end{itemdescr}
1075010750

1075110751
\indexlibraryctor{latch}%
@@ -10761,7 +10761,7 @@
1076110761

1076210762
\pnum
1076310763
\effects
10764-
Initializes \tcode{counter} with \tcode{expected}.
10764+
Initializes \exposid{counter} with \tcode{expected}.
1076510765

1076610766
\pnum
1076710767
\throws
@@ -10777,12 +10777,12 @@
1077710777
\pnum
1077810778
\expects
1077910779
\tcode{update >= 0} is \tcode{true}, and
10780-
\tcode{update <= counter} is \tcode{true}.
10780+
\tcode{update <= \exposid{counter}} is \tcode{true}.
1078110781

1078210782
\pnum
1078310783
\effects
10784-
Atomically decrements \tcode{counter} by \tcode{update}.
10785-
If \tcode{counter} is equal to zero,
10784+
Atomically decrements \exposid{counter} by \tcode{update}.
10785+
If \exposid{counter} is equal to zero,
1078610786
unblocks all threads blocked on \tcode{*this}.
1078710787

1078810788
\pnum
@@ -10807,7 +10807,7 @@
1080710807
\begin{itemdescr}
1080810808
\pnum
1080910809
\returns
10810-
With very low probability \tcode{false}. Otherwise \tcode{counter == 0}.
10810+
With very low probability \tcode{false}. Otherwise \tcode{\exposid{counter} == 0}.
1081110811
\end{itemdescr}
1081210812

1081310813
\indexlibrarymember{wait}{latch}%
@@ -10819,9 +10819,9 @@
1081910819
\pnum
1082010820
\indextext{block (execution)}%
1082110821
\effects
10822-
If \tcode{counter} equals zero, returns immediately.
10822+
If \exposid{counter} equals zero, returns immediately.
1082310823
Otherwise, blocks on \tcode{*this}
10824-
until a call to \tcode{count_down} that decrements \tcode{counter} to zero.
10824+
until a call to \tcode{count_down} that decrements \exposid{counter} to zero.
1082510825

1082610826
\pnum
1082710827
\throws

0 commit comments

Comments
 (0)