10722
10722
void arrive_and_wait(ptrdiff_t update = 1);
10723
10723
10724
10724
private:
10725
- ptrdiff_t counter; // \expos
10725
+ ptrdiff_t @ \exposid { counter}@ ; // \expos
10726
10726
};
10727
10727
}
10728
10728
\end {codeblock }
10745
10745
\begin {itemdescr }
10746
10746
\pnum
10747
10747
\returns
10748
- The maximum value of \tcode {counter} that the implementation supports.
10748
+ The maximum value of \exposid {counter} that the implementation supports.
10749
10749
\end {itemdescr }
10750
10750
10751
10751
\indexlibraryctor {latch}%
10761
10761
10762
10762
\pnum
10763
10763
\effects
10764
- Initializes \tcode {counter} with \tcode {expected}.
10764
+ Initializes \exposid {counter} with \tcode {expected}.
10765
10765
10766
10766
\pnum
10767
10767
\throws
@@ -10777,12 +10777,12 @@
10777
10777
\pnum
10778
10778
\expects
10779
10779
\tcode {update >= 0} is \tcode {true}, and
10780
- \tcode {update <= counter} is \tcode {true}.
10780
+ \tcode {update <= \exposid { counter} } is \tcode {true}.
10781
10781
10782
10782
\pnum
10783
10783
\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,
10786
10786
unblocks all threads blocked on \tcode {*this}.
10787
10787
10788
10788
\pnum
10807
10807
\begin {itemdescr }
10808
10808
\pnum
10809
10809
\returns
10810
- With very low probability \tcode {false}. Otherwise \tcode {counter == 0}.
10810
+ With very low probability \tcode {false}. Otherwise \tcode {\exposid { counter} == 0}.
10811
10811
\end {itemdescr }
10812
10812
10813
10813
\indexlibrarymember {wait}{latch}%
10819
10819
\pnum
10820
10820
\indextext {block (execution)}%
10821
10821
\effects
10822
- If \tcode {counter} equals zero, returns immediately.
10822
+ If \exposid {counter} equals zero, returns immediately.
10823
10823
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.
10825
10825
10826
10826
\pnum
10827
10827
\throws
0 commit comments