Skip to content

Commit f1e920a

Browse files
[thread.latch.class] Exposition-only style for counter
1 parent 8b07421 commit f1e920a

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

1072510725
private:
10726-
ptrdiff_t counter; // \expos
10726+
ptrdiff_t @\exposid{counter}@; // \expos
1072710727
};
1072810728
}
1072910729
\end{codeblock}
@@ -10746,7 +10746,7 @@
1074610746
\begin{itemdescr}
1074710747
\pnum
1074810748
\returns
10749-
The maximum value of \tcode{counter} that the implementation supports.
10749+
The maximum value of \exposid{counter} that the implementation supports.
1075010750
\end{itemdescr}
1075110751

1075210752
\indexlibraryctor{latch}%
@@ -10762,7 +10762,7 @@
1076210762

1076310763
\pnum
1076410764
\effects
10765-
Initializes \tcode{counter} with \tcode{expected}.
10765+
Initializes \exposid{counter} with \tcode{expected}.
1076610766

1076710767
\pnum
1076810768
\throws
@@ -10778,12 +10778,12 @@
1077810778
\pnum
1077910779
\expects
1078010780
\tcode{update >= 0} is \tcode{true}, and
10781-
\tcode{update <= counter} is \tcode{true}.
10781+
\tcode{update <= \exposid{counter}} is \tcode{true}.
1078210782

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

1078910789
\pnum
@@ -10808,7 +10808,7 @@
1080810808
\begin{itemdescr}
1080910809
\pnum
1081010810
\returns
10811-
With very low probability \tcode{false}. Otherwise \tcode{counter == 0}.
10811+
With very low probability \tcode{false}. Otherwise \tcode{\exposid{counter} == 0}.
1081210812
\end{itemdescr}
1081310813

1081410814
\indexlibrarymember{wait}{latch}%
@@ -10820,9 +10820,9 @@
1082010820
\pnum
1082110821
\indextext{block (execution)}%
1082210822
\effects
10823-
If \tcode{counter} equals zero, returns immediately.
10823+
If \exposid{counter} equals zero, returns immediately.
1082410824
Otherwise, blocks on \tcode{*this}
10825-
until a call to \tcode{count_down} that decrements \tcode{counter} to zero.
10825+
until a call to \tcode{count_down} that decrements \exposid{counter} to zero.
1082610826

1082710827
\pnum
1082810828
\throws

0 commit comments

Comments
 (0)