名前空間
変種
操作

std::atomic_is_lock_free, ATOMIC_xxx_LOCK_FREE

提供: cppreference.com
< cpp‎ | atomic

 
 
アトミック操作ライブラリ
タイプ
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
atomic(C++11)
atomic_is_lock_free(C++11)
機能します
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
atomic_store
atomic_store_explicit
(C++11)
(C++11)
atomic_load
atomic_load_explicit
(C++11)
(C++11)
atomic_exchange
atomic_exchange_explicit
(C++11)
(C++11)
atomic_compare_exchange_weak
atomic_compare_exchange_weak_explicit
atomic_compare_exchange_strong
atomic_compare_exchange_strong_explicit
(C++11)
(C++11)
(C++11)
(C++11)
atomic_fetch_add
atomic_fetch_add_explicit
(C++11)
(C++11)
atomic_fetch_sub
atomic_fetch_sub_explicit
(C++11)
(C++11)
atomic_fetch_and
atomic_fetch_and_explicit
(C++11)
(C++11)
atomic_fetch_or
atomic_fetch_or_explicit
(C++11)
(C++11)
atomic_fetch_xor
atomic_fetch_xor_explicit
(C++11)
(C++11)
アトミックのフラグ
Original:
Atomic flags
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
atomic_flag(C++11)
atomic_flag_test_and_set
atomic_flag_test_and_set_explicit
(C++11)
(C++11)
atomic_flag_clear
atomic_flag_clear_explicit
(C++11)
(C++11)
初期化
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
atomic_init(C++11)
ATOMIC_VAR_INIT(C++11)
ATOMIC_FLAG_INIT(C++11)
メモリは発注
Original:
Memory ordering
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
memory_order(C++11)
kill_dependency(C++11)
atomic_thread_fence(C++11)
atomic_signal_fence(C++11)
 
Defined in header <atomic>
template< class Atomic >
bool atomic_is_lock_free(const volatile Atomic* obj)
(1) (C++11およびそれ以降)
template< class Atomic >
bool atomic_is_lock_free(const Atomic* obj)
(2) (C++11およびそれ以降)
#define ATOMIC_CHAR_LOCK_FREE     /* unspecified */

#define ATOMIC_CHAR16_T_LOCK_FREE /* unspecified */
#define ATOMIC_CHAR32_T_LOCK_FREE /* unspecified */
#define ATOMIC_WCHAR_T_LOCK_FREE  /* unspecified */
#define ATOMIC_SHORT_LOCK_FREE    /* unspecified */
#define ATOMIC_INT_LOCK_FREE      /* unspecified */
#define ATOMIC_LONG_LOCK_FREE     /* unspecified */
#define ATOMIC_LLONG_LOCK_FREE    /* unspecified */

#define ATOMIC_POINTER_LOCK_FREE  /* unspecified */
(3) (C++11およびそれ以降)
1-2)
アトミックオブジェクトがobjとしてはobj->is_lock_free()を呼び出している場合、ロックフリーで実装されていますが指すかどうかを決定します
Original:
Determines if the atomic object pointed to by obj is implemented lock-free, as if by calling obj->is_lock_free()
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
その組み込み時々ロックフリーでアトミック型、0にするための組み込み原子タイプ用1に、ロックフリーになることはありませんアトミック組み込み型の値2と整数定数式に展開常にロックフリーです.
Original:
Expands to an integer constant expression with value 0 for the built-in atomic types that are never lock-free, to 1 for the built-in atomic types that are sometimes lock-free, and to 2 for the built-in atomic types that are always lock-free.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目次

[編集] ノート

std::atomic_flagを除くすべての原子タイプではなくロックフリーアトミックCPU命令を使用するのではなく、ミューテックスなどのロック操作を使用して実装することができる。アトミック型も時には'ロックフリー、などであることが許されるのみ整列メモリアクセスが与えられたアーキテクチャ上で自然にアトミックであれば、同じ種類のオブジェクトがずれてロックを使用する必要があります。タイプが時々ロックフリーであれば、この関数(1-2)またはそのメンバ関数相当する特定のインスタンスがロックフリーであるかどうかを判断するために使用されなければならない.
Original:
All atomic types except for std::atomic_flag may be implemented using mutexes or other locking operations, rather than using the lock-free atomic CPU instructions. Atomic types are also allowed to be sometimes lock-free, e.g. if only aligned memory accesses are naturally atomic on a given architecture, misaligned objects of the same type have to use locks. If the type is sometimes lock-free, then the function (1-2) or its member function equivalent has to be used to determine if the particular instance is lock-free.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] パラメータ

obj -
調べるためにアトミックオブジェクトへのポインタ
Original:
pointer to the atomic object to examine
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 値を返します

true*objはロックフリーアトミックであれば、そうでなければfalse.
Original:
true if *obj is a lock-free atomic, false otherwise.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 例外

noexcept specification:  
noexcept
  (C++11およびそれ以降)

[編集]

[編集] も参照してください

原子オブジェクトがロックフリーであるかどうかをチェックします
Original:
checks if the atomic object is lock-free
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::atomic) [edit]
std::shared_ptrためのアトミック操作を専門としています
Original:
specializes atomic operations for std::shared_ptr
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(関数テンプレート)
ロックフリーブール原子型
Original:
the lock-free boolean atomic type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(クラス) [edit]