|
663 | 663 | \begin{itemize}
|
664 | 664 | \item \tcode{atomic<T>::wait},
|
665 | 665 | \item \tcode{atomic_flag::wait},
|
666 |
| -\item \tcode{atomic_wait} and \tcode{atomic_wait_explicit}, and |
667 |
| -\item \tcode{atomic_flag_wait} and \tcode{atomic_flag_wait_explicit}. |
| 666 | +\item \tcode{atomic_wait} and \tcode{atomic_wait_explicit}, |
| 667 | +\item \tcode{atomic_flag_wait} and \tcode{atomic_flag_wait_explicit}, and |
| 668 | +\item \tcode{atomic_ref<T>::wait}. |
668 | 669 | \end{itemize}
|
669 | 670 | \end{note}
|
670 | 671 |
|
|
674 | 675 | \begin{itemize}
|
675 | 676 | \item \tcode{atomic<T>::notify_one} and \tcode{atomic<T>::notify_all},
|
676 | 677 | \item \tcode{atomic_flag::notify_one} and \tcode{atomic_flag::notify_all},
|
677 |
| -\item \tcode{atomic_notify_one} and \tcode{atomic_notify_all}, and |
678 |
| -\item \tcode{atomic_flag_notify_one} and \tcode{atomic_flag_notify_all}. |
| 678 | +\item \tcode{atomic_notify_one} and \tcode{atomic_notify_all}, |
| 679 | +\item \tcode{atomic_flag_notify_one} and \tcode{atomic_flag_notify_all}, and |
| 680 | +\item \tcode{atomic_ref<T>::notify_one} and \tcode{atomic_ref<T>::notify_all}. |
679 | 681 | \end{itemize}
|
680 | 682 | \end{note}
|
681 | 683 |
|
|
724 | 726 | memory_order = memory_order_seq_cst) const noexcept;
|
725 | 727 | bool compare_exchange_strong(T&, T,
|
726 | 728 | memory_order = memory_order_seq_cst) const noexcept;
|
| 729 | + void wait(T, memory_order = memory_order::seq_cst) const noexcept; |
| 730 | + void notify_one() noexcept; |
| 731 | + void notify_all() noexcept; |
727 | 732 | };
|
728 | 733 | }
|
729 | 734 | \end{codeblock}
|
|
1017 | 1022 | \end{note}
|
1018 | 1023 | \end{itemdescr}
|
1019 | 1024 |
|
| 1025 | +\indexlibrarymember{wait}{atomic_ref<T>}% |
| 1026 | +\begin{itemdecl} |
| 1027 | +void wait(T old, memory_order order = memory_order::seq_cst) const noexcept; |
| 1028 | +\end{itemdecl} |
| 1029 | + |
| 1030 | +\begin{itemdescr} |
| 1031 | +\pnum |
| 1032 | +\expects |
| 1033 | +\tcode{order} is |
| 1034 | +neither \tcode{memory_order::release} nor \tcode{memory_order::acq_rel}. |
| 1035 | + |
| 1036 | +\pnum |
| 1037 | +\effects |
| 1038 | +Repeatedly performs the following steps, in order: |
| 1039 | +\begin{itemize} |
| 1040 | +\item |
| 1041 | + Evaluates \tcode{load(order)} and |
| 1042 | + compares its value representation for equality against that of \tcode{old}. |
| 1043 | +\item |
| 1044 | + If they compare unequal, returns. |
| 1045 | +\item |
| 1046 | + Blocks until it |
| 1047 | + is unblocked by an atomic notifying operation or is unblocked spuriously. |
| 1048 | +\end{itemize} |
| 1049 | + |
| 1050 | +\pnum |
| 1051 | +\remarks |
| 1052 | +This function is an atomic waiting operation\iref{atomics.wait} |
| 1053 | +on atomic object \tcode{*ptr}. |
| 1054 | +\end{itemdescr} |
| 1055 | + |
| 1056 | +\indexlibrarymember{notify_one}{atomic_ref<T>}% |
| 1057 | +\begin{itemdecl} |
| 1058 | +void notify_one() noexcept; |
| 1059 | +\end{itemdecl} |
| 1060 | + |
| 1061 | +\begin{itemdescr} |
| 1062 | +\pnum |
| 1063 | +\expects |
| 1064 | +Unblocks the execution of at least one atomic waiting operation on \tcode{*ptr} |
| 1065 | +that is eligible to be unblocked\iref{atomics.wait} by this call, |
| 1066 | +if any such atomic waiting operations exist. |
| 1067 | + |
| 1068 | +\pnum |
| 1069 | +\remarks |
| 1070 | +This function is an atomic notifying operation\iref{atomics.wait} |
| 1071 | +on atomic object \tcode{*ptr}. |
| 1072 | +\end{itemdescr} |
| 1073 | + |
| 1074 | +\indexlibrarymember{notify_all}{atomic_ref<T>}% |
| 1075 | +\begin{itemdecl} |
| 1076 | +void notify_all() noexcept; |
| 1077 | +\end{itemdecl} |
| 1078 | + |
| 1079 | +\begin{itemdescr} |
| 1080 | +\pnum |
| 1081 | +\expects |
| 1082 | +Unblocks the execution of all atomic waiting operations on \tcode{*ptr} |
| 1083 | +that are eligible to be unblocked\iref{atomics.wait} by this call. |
| 1084 | + |
| 1085 | +\pnum |
| 1086 | +\remarks |
| 1087 | + This function is an atomic notifying operation\iref{atomics.wait} |
| 1088 | + on atomic object \tcode{*ptr}. |
| 1089 | +\end{itemdescr} |
| 1090 | + |
1020 | 1091 | \rSec2[atomics.ref.int]{Specializations for integral types}
|
1021 | 1092 |
|
1022 | 1093 | \pnum
|
|
1079 | 1150 | bool compare_exchange_strong(@\placeholder{integral}@&, @\placeholder{integral}@,
|
1080 | 1151 | memory_order = memory_order_seq_cst) const noexcept;
|
1081 | 1152 |
|
| 1153 | + void wait(integral, memory_order = memory_order::seq_cst) const noexcept; |
| 1154 | + void notify_one() noexcept; |
| 1155 | + void notify_all() noexcept; |
| 1156 | + |
1082 | 1157 | @\placeholdernc{integral}@ fetch_add(@\placeholdernc{integral}@,
|
1083 | 1158 | memory_order = memory_order_seq_cst) const noexcept;
|
1084 | 1159 | @\placeholdernc{integral}@ fetch_sub(@\placeholdernc{integral}@,
|
|
1206 | 1281 | bool compare_exchange_strong(@\placeholder{floating-point}@&, @\placeholder{floating-point}@,
|
1207 | 1282 | memory_order = memory_order_seq_cst) const noexcept;
|
1208 | 1283 |
|
| 1284 | + void wait(@\placeholdernc{floating-point}@, memory_order = memory_order::seq_cst) const noexcept; |
| 1285 | + void notify_one() noexcept; |
| 1286 | + void notify_all() noexcept; |
| 1287 | + |
1209 | 1288 | @\placeholder{floating-point}@ fetch_add(@\placeholder{floating-point}@,
|
1210 | 1289 | memory_order = memory_order_seq_cst) const noexcept;
|
1211 | 1290 | @\placeholder{floating-point}@ fetch_sub(@\placeholder{floating-point}@,
|
|
1303 | 1382 | bool compare_exchange_strong(T*&, T*,
|
1304 | 1383 | memory_order = memory_order_seq_cst) const noexcept;
|
1305 | 1384 |
|
| 1385 | + void wait(T*, memory_order = memory_order::seq_cst) const noexcept; |
| 1386 | + void notify_one() noexcept; |
| 1387 | + void notify_all() noexcept; |
| 1388 | + |
1306 | 1389 | T* fetch_add(difference_type, memory_order = memory_order_seq_cst) const noexcept;
|
1307 | 1390 | T* fetch_sub(difference_type, memory_order = memory_order_seq_cst) const noexcept;
|
1308 | 1391 |
|
|
0 commit comments