Skip to content

Commit 144d4e0

Browse files
[thread.sema.cnt] Exposition-only style for counter
1 parent 39cdfce commit 144d4e0

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

source/threads.tex

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10467,7 +10467,7 @@
1046710467
bool try_acquire_until(const chrono::time_point<Clock, Duration>& abs_time);
1046810468

1046910469
private:
10470-
ptrdiff_t counter; // \expos
10470+
ptrdiff_t @\exposid{counter}@; // \expos
1047110471
};
1047210472
}
1047310473
\end{codeblock}
@@ -10497,7 +10497,7 @@
1049710497
\begin{itemdescr}
1049810498
\pnum
1049910499
\returns
10500-
The maximum value of \tcode{counter}.
10500+
The maximum value of \exposid{counter}.
1050110501
This value is greater than or equal to \tcode{least_max_value}.
1050210502
\end{itemdescr}
1050310503

@@ -10514,7 +10514,7 @@
1051410514

1051510515
\pnum
1051610516
\effects
10517-
Initializes \tcode{counter} with \tcode{desired}.
10517+
Initializes \exposid{counter} with \tcode{desired}.
1051810518

1051910519
\pnum
1052010520
\throws
@@ -10530,13 +10530,13 @@
1053010530
\pnum
1053110531
\expects
1053210532
\tcode{update >= 0} is \tcode{true}, and
10533-
\tcode{update <= max() - counter} is \tcode{true}.
10533+
\tcode{update <= max() - \exposid{counter}} is \tcode{true}.
1053410534

1053510535
\pnum
1053610536
\effects
10537-
Atomically execute \tcode{counter += update}.
10537+
Atomically execute \tcode{\exposid{counter} += update}.
1053810538
Then, unblocks any threads
10539-
that are waiting for \tcode{counter} to be greater than zero.
10539+
that are waiting for \exposid{counter} to be greater than zero.
1054010540

1054110541
\pnum
1054210542
\sync
@@ -10561,11 +10561,11 @@
1056110561
\begin{itemdescr}
1056210562
\pnum
1056310563
\effects
10564-
Attempts to atomically decrement \tcode{counter} if it is positive,
10564+
Attempts to atomically decrement \exposid{counter} if it is positive,
1056510565
without blocking.
10566-
If \tcode{counter} is not decremented, there is no effect and
10566+
If \exposid{counter} is not decremented, there is no effect and
1056710567
\tcode{try_acquire} immediately returns.
10568-
An implementation may fail to decrement \tcode{counter}
10568+
An implementation may fail to decrement \exposid{counter}
1056910569
even if it is positive.
1057010570
\begin{note}
1057110571
This spurious failure is normally uncommon, but
@@ -10578,7 +10578,7 @@
1057810578

1057910579
\pnum
1058010580
\returns
10581-
\tcode{true} if \tcode{counter} was decremented, otherwise \tcode{false}.
10581+
\tcode{true} if \exposid{counter} was decremented, otherwise \tcode{false}.
1058210582
\end{itemdescr}
1058310583

1058410584
\indexlibrarymember{acquire}{counting_semaphore}%
@@ -10594,7 +10594,7 @@
1059410594
\item Evaluates \tcode{try_acquire()}. If the result is \tcode{true}, returns.
1059510595
\item
1059610596
\indextext{block (execution)}%
10597-
Blocks on \tcode{*this} until \tcode{counter} is greater than zero.
10597+
Blocks on \tcode{*this} until \exposid{counter} is greater than zero.
1059810598
\end{itemize}
1059910599

1060010600
\pnum
@@ -10627,7 +10627,7 @@
1062710627
\item
1062810628
\indextext{block (execution)}%
1062910629
Blocks on \tcode{*this}
10630-
until \tcode{counter} is greater than zero or until the timeout expires.
10630+
until \exposid{counter} is greater than zero or until the timeout expires.
1063110631
If it is unblocked by the timeout expiring, returns \tcode{false}.
1063210632
\end{itemize}
1063310633
The timeout expires\iref{thread.req.timing}

0 commit comments

Comments
 (0)