std::atomic_flag:: test_and_set
From cppreference.net
<
cpp
|
atomic
|
atomic flag
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::atomic_flag
| Member functions | ||||
|
atomic_flag::test_and_set
|
||||
|
(C++20)
|
||||
|
(C++20)
|
||||
|
(C++20)
|
||||
|
(C++20)
|
|
定義先ヘッダ
<atomic>
|
||
|
bool
test_and_set
(
std::
memory_order
order
=
std:: memory_order_seq_cst ) volatile noexcept ; |
(1) | (C++11以降) |
|
bool
test_and_set
(
std::
memory_order
order
=
std:: memory_order_seq_cst ) noexcept ; |
(2) | (C++11以降) |
std::atomic_flag の状態をアトミックに設定済み( true )に変更し、変更前の値を返します。
パラメータ
| order | - | メモリ同期順序 |
関連項目
|
フラグをアトミックに
false
に設定する
(public member function) |
|
|
(C++11)
(C++11)
|
フラグをアトミックに
true
に設定し、以前の値を返す
(function) |
|
(C++11)
|
指定されたアトミック操作に対するメモリ順序制約を定義する
(enum) |