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 }
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}%
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,
1078610786unblocks all threads blocked on \tcode {*this}.
1078710787
1078810788\pnum
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}%
1081910819\pnum
1082010820\indextext {block (execution)}%
1082110821\effects
10822- If \tcode {counter} equals zero, returns immediately.
10822+ If \exposid {counter} equals zero, returns immediately.
1082310823Otherwise, 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