Skip to content

Commit ba9e040

Browse files
[thread.lock.unique] Exposition-only style for pm and owns
1 parent fdd8a8e commit ba9e040

File tree

1 file changed

+45
-45
lines changed

1 file changed

+45
-45
lines changed

source/threads.tex

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -8400,8 +8400,8 @@
84008400
mutex_type* mutex() const noexcept;
84018401

84028402
private:
8403-
mutex_type* pm; // \expos
8404-
bool owns; // \expos
8403+
mutex_type* @\exposid{pm}@; // \expos
8404+
bool @\exposid{owns}@; // \expos
84058405
};
84068406
}
84078407
\end{codeblock}
@@ -8412,8 +8412,8 @@
84128412
construction or after construction, and may be transferred, after
84138413
acquisition, to another \tcode{unique_lock} object. Objects of type \tcode{unique_lock} are not
84148414
copyable but are movable. The behavior of a program is undefined if the contained pointer
8415-
\tcode{pm} is not null and the lockable object pointed
8416-
to by \tcode{pm} does not exist for the entire remaining
8415+
\exposid{pm} is not null and the lockable object pointed
8416+
to by \exposid{pm} does not exist for the entire remaining
84178417
lifetime\iref{basic.life} of the \tcode{unique_lock} object. The supplied
84188418
\tcode{Mutex} type shall meet the \oldconcept{BasicLockable}
84198419
requirements\iref{thread.req.lockable.basic}.
@@ -8438,7 +8438,7 @@
84388438
\begin{itemdescr}
84398439
\pnum
84408440
\ensures
8441-
\tcode{pm == nullptr} and \tcode{owns == false}.
8441+
\tcode{\exposid{pm} == nullptr} and \tcode{\exposid{owns} == false}.
84428442
\end{itemdescr}
84438443

84448444
\indexlibraryctor{unique_lock}%
@@ -8453,7 +8453,7 @@
84538453

84548454
\pnum
84558455
\ensures
8456-
\tcode{pm == addressof(m)} and \tcode{owns == true}.
8456+
\tcode{\exposid{pm} == addressof(m)} and \tcode{\exposid{owns} == true}.
84578457
\end{itemdescr}
84588458

84598459
\indexlibraryctor{unique_lock}%
@@ -8464,7 +8464,7 @@
84648464
\begin{itemdescr}
84658465
\pnum
84668466
\ensures
8467-
\tcode{pm == addressof(m)} and \tcode{owns == false}.
8467+
\tcode{\exposid{pm} == addressof(m)} and \tcode{\exposid{owns} == false}.
84688468
\end{itemdescr}
84698469

84708470
\indexlibraryctor{unique_lock}%
@@ -8484,7 +8484,7 @@
84848484

84858485
\pnum
84868486
\ensures
8487-
\tcode{pm == addressof(m)} and \tcode{owns == res},
8487+
\tcode{\exposid{pm} == addressof(m)} and \tcode{o\exposid{owns}wns == res},
84888488
where \tcode{res} is the value returned by the call to \tcode{m.try_lock()}.
84898489
\end{itemdescr}
84908490

@@ -8500,7 +8500,7 @@
85008500

85018501
\pnum
85028502
\ensures
8503-
\tcode{pm == addressof(m)} and \tcode{owns == true}.
8503+
\tcode{\exposid{pm} == addressof(m)} and \tcode{\exposid{owns} == true}.
85048504

85058505
\pnum
85068506
\throws
@@ -8525,7 +8525,7 @@
85258525

85268526
\pnum
85278527
\ensures
8528-
\tcode{pm == addressof(m)} and \tcode{owns == res},
8528+
\tcode{\exposid{pm} == addressof(m)} and \tcode{\exposid{owns} == res},
85298529
where \tcode{res} is
85308530
the value returned by the call to \tcode{m.try_lock_until(abs_time)}.
85318531
\end{itemdescr}
@@ -8547,7 +8547,7 @@
85478547

85488548
\pnum
85498549
\ensures
8550-
\tcode{pm == addressof(m)} and \tcode{owns == res},
8550+
\tcode{\exposid{pm} == addressof(m)} and \tcode{\exposid{owns} == res},
85518551
where \tcode{res} is the value returned by the call to \tcode{m.try_lock_for(rel_time)}.
85528552
\end{itemdescr}
85538553

@@ -8559,7 +8559,7 @@
85598559
\begin{itemdescr}
85608560
\pnum
85618561
\ensures
8562-
\tcode{pm == u_p.pm} and \tcode{owns == u_p.owns} (where \tcode{u_p} is the state of \tcode{u} just prior to this construction), \tcode{u.pm == 0} and \tcode{u.owns == false}.
8562+
\tcode{\exposid{pm} == u_p.\exposid{pm}} and \tcode{\exposid{owns} == u_p.\exposid{owns}} (where \tcode{u_p} is the state of \tcode{u} just prior to this construction), \tcode{u.\exposid{pm} == 0} and \tcode{u.\exposid{owns} == false}.
85638563
\end{itemdescr}
85648564

85658565
\indexlibrarymember{operator=}{unique_lock}%
@@ -8585,7 +8585,7 @@
85858585
\begin{itemdescr}
85868586
\pnum
85878587
\effects
8588-
If \tcode{owns} calls \tcode{pm->unlock()}.
8588+
If \exposid{owns} calls \tcode{\exposid{pm}->unlock()}.
85898589
\end{itemdescr}
85908590

85918591
\rSec4[thread.lock.unique.locking]{Locking}
@@ -8598,22 +8598,22 @@
85988598
\begin{itemdescr}
85998599
\pnum
86008600
\effects
8601-
As if by \tcode{pm->lock()}.
8601+
As if by \tcode{\exposid{pm}->lock()}.
86028602

86038603
\pnum
86048604
\ensures
8605-
\tcode{owns == true}.
8605+
\tcode{\exposid{owns} == true}.
86068606

86078607
\pnum
86088608
\throws
8609-
Any exception thrown by \tcode{pm->lock()}. \tcode{system_error} when an exception
8609+
Any exception thrown by \tcode{\exposid{pm}->lock()}. \tcode{system_error} when an exception
86108610
is required\iref{thread.req.exception}.
86118611

86128612
\pnum
86138613
\errors
86148614
\begin{itemize}
8615-
\item \tcode{operation_not_permitted} --- if \tcode{pm} is \keyword{nullptr}.
8616-
\item \tcode{resource_deadlock_would_occur} --- if on entry \tcode{owns}
8615+
\item \tcode{operation_not_permitted} --- if \exposid{pm} is \keyword{nullptr}.
8616+
\item \tcode{resource_deadlock_would_occur} --- if on entry \exposid{owns}
86178617
is \tcode{true}.
86188618
\end{itemize}
86198619
\end{itemdescr}
@@ -8631,27 +8631,27 @@
86318631

86328632
\pnum
86338633
\effects
8634-
As if by \tcode{pm->try_lock()}.
8634+
As if by \tcode{\exposid{pm}->try_lock()}.
86358635

86368636
\pnum
86378637
\ensures
8638-
\tcode{owns == res}, where \tcode{res} is the value returned by
8639-
\tcode{pm->try_lock()}.
8638+
\tcode{\exposid{owns} == res}, where \tcode{res} is the value returned by
8639+
\tcode{\exposid{pm}->try_lock()}.
86408640

86418641
\pnum
86428642
\returns
8643-
The value returned by \tcode{pm->try_lock()}.
8643+
The value returned by \tcode{\exposid{pm}->try_lock()}.
86448644

86458645
\pnum
86468646
\throws
8647-
Any exception thrown by \tcode{pm->try_lock()}. \tcode{system_error} when an exception
8647+
Any exception thrown by \tcode{\exposid{pm}->try_lock()}. \tcode{system_error} when an exception
86488648
is required\iref{thread.req.exception}.
86498649

86508650
\pnum
86518651
\errors
86528652
\begin{itemize}
8653-
\item \tcode{operation_not_permitted} --- if \tcode{pm} is \keyword{nullptr}.
8654-
\item \tcode{resource_deadlock_would_occur} --- if on entry \tcode{owns}
8653+
\item \tcode{operation_not_permitted} --- if \exposid{pm} is \keyword{nullptr}.
8654+
\item \tcode{resource_deadlock_would_occur} --- if on entry \exposid{owns}
86558655
is \tcode{true}.
86568656
\end{itemize}
86578657
\end{itemdescr}
@@ -8670,27 +8670,27 @@
86708670

86718671
\pnum
86728672
\effects
8673-
As if by \tcode{pm->try_lock_until(abs_time)}.
8673+
As if by \tcode{\exposid{pm}->try_lock_until(abs_time)}.
86748674

86758675
\pnum
86768676
\ensures
8677-
\tcode{owns == res}, where \tcode{res} is the value returned by
8678-
\tcode{pm->try_lock_until(abs_time)}.
8677+
\tcode{\exposid{owns} == res}, where \tcode{res} is the value returned by
8678+
\tcode{\exposid{pm}->try_lock_until(abs_time)}.
86798679

86808680
\pnum
86818681
\returns
8682-
The value returned by \tcode{pm->try_lock_until(abs_time)}.
8682+
The value returned by \tcode{\exposid{pm}->try_lock_until(abs_time)}.
86838683

86848684
\pnum
86858685
\throws
8686-
Any exception thrown by \tcode{pm->try_lock_until(abstime)}. \tcode{system_error} when an
8686+
Any exception thrown by \tcode{\exposid{pm}->try_lock_until(abstime)}. \tcode{system_error} when an
86878687
exception is required\iref{thread.req.exception}.
86888688

86898689
\pnum
86908690
\errors
86918691
\begin{itemize}
8692-
\item \tcode{operation_not_permitted} --- if \tcode{pm} is \keyword{nullptr}.
8693-
\item \tcode{resource_deadlock_would_occur} --- if on entry \tcode{owns} is
8692+
\item \tcode{operation_not_permitted} --- if \exposid{pm} is \keyword{nullptr}.
8693+
\item \tcode{resource_deadlock_would_occur} --- if on entry \exposid{owns} is
86948694
\tcode{true}.
86958695
\end{itemize}
86968696
\end{itemdescr}
@@ -8708,26 +8708,26 @@
87088708

87098709
\pnum
87108710
\effects
8711-
As if by \tcode{pm->try_lock_for(rel_time)}.
8711+
As if by \tcode{\exposid{pm}->try_lock_for(rel_time)}.
87128712

87138713
\pnum
87148714
\ensures
8715-
\tcode{owns == res}, where \tcode{res} is the value returned by \tcode{pm->try_lock_for(rel_time)}.
8715+
\tcode{\exposid{owns} == res}, where \tcode{res} is the value returned by \tcode{\exposid{pm}->try_lock_for(rel_time)}.
87168716

87178717
\pnum
87188718
\returns
8719-
The value returned by \tcode{pm->try_lock_for(rel_time)}.
8719+
The value returned by \tcode{\exposid{pm}->try_lock_for(rel_time)}.
87208720

87218721
\pnum
87228722
\throws
8723-
Any exception thrown by \tcode{pm->try_lock_for(rel_time)}. \tcode{system_error} when an
8723+
Any exception thrown by \tcode{\exposid{pm}->try_lock_for(rel_time)}. \tcode{system_error} when an
87248724
exception is required\iref{thread.req.exception}.
87258725

87268726
\pnum
87278727
\errors
87288728
\begin{itemize}
8729-
\item \tcode{operation_not_permitted} --- if \tcode{pm} is \keyword{nullptr}.
8730-
\item \tcode{resource_deadlock_would_occur} --- if on entry \tcode{owns} is
8729+
\item \tcode{operation_not_permitted} --- if \exposid{pm} is \keyword{nullptr}.
8730+
\item \tcode{resource_deadlock_would_occur} --- if on entry \exposid{owns} is
87318731
\tcode{true}.
87328732
\end{itemize}
87338733
\end{itemdescr}
@@ -8740,11 +8740,11 @@
87408740
\begin{itemdescr}
87418741
\pnum
87428742
\effects
8743-
As if by \tcode{pm->unlock()}.
8743+
As if by \tcode{\exposid{pm}->unlock()}.
87448744

87458745
\pnum
87468746
\ensures
8747-
\tcode{owns == false}.
8747+
\tcode{\exposid{owns} == false}.
87488748

87498749
\pnum
87508750
\throws
@@ -8754,7 +8754,7 @@
87548754
\pnum
87558755
\errors
87568756
\begin{itemize}
8757-
\item \tcode{operation_not_permitted} --- if on entry \tcode{owns} is \tcode{false}.
8757+
\item \tcode{operation_not_permitted} --- if on entry \exposid{owns} is \tcode{false}.
87588758
\end{itemize}
87598759
\end{itemdescr}
87608760

@@ -8779,11 +8779,11 @@
87798779
\begin{itemdescr}
87808780
\pnum
87818781
\ensures
8782-
\tcode{pm == 0} and \tcode{owns == false}.
8782+
\tcode{\exposid{pm} == 0} and \tcode{\exposid{owns} == false}.
87838783

87848784
\pnum
87858785
\returns
8786-
The previous value of \tcode{pm}.
8786+
The previous value of \exposid{pm}.
87878787
\end{itemdescr}
87888788

87898789
\indexlibrarymember{swap}{unique_lock}%
@@ -8808,7 +8808,7 @@
88088808
\begin{itemdescr}
88098809
\pnum
88108810
\returns
8811-
\tcode{owns}.
8811+
\exposid{owns}.
88128812
\end{itemdescr}
88138813

88148814
\indexlibrarymember{operator bool}{unique_lock}%
@@ -8830,7 +8830,7 @@
88308830
\begin{itemdescr}
88318831
\pnum
88328832
\returns
8833-
\tcode{pm}.
8833+
\exposid{pm}.
88348834
\end{itemdescr}
88358835

88368836
\rSec3[thread.lock.shared]{Class template \tcode{shared_lock}}

0 commit comments

Comments
 (0)