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 }
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}%
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,
1076110761unblocks all threads blocked on \tcode {*this}.
1076210762
1076310763\pnum
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}%
1079410794\pnum
1079510795\indextext {block (execution)}%
1079610796\effects
10797- If \tcode {counter} equals zero, returns immediately.
10797+ If \exposid {counter} equals zero, returns immediately.
1079810798Otherwise, 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