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