名前空間
変種
操作

atomic_load, atomic_load_explicit

提供: cppreference.com
< c‎ | atomic

Defined in header <stdatomic.h>
C atomic_load( volatile A* obj );
(1)
C atomic_load_explicit( volatile A* obj, memory_order order );
(2)
アトミック負荷とobjが指すアトミック変数の現在の値を返します。操作は原子読み取り操作です.
Original:
Atomically loads and returns the current value of the atomic variable pointed to by obj. The operation is atomic read operation.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
最初のバージョンの受注メモリがmemory_order_seq_cstに従ってアクセスし、2番目のバージョンの受注メモリはorderに従ってアクセスします。 ordermemory_order_relaxedのいずれかである必要があり、memory_order_consumememory_order_acquireまたはmemory_order_seq_cst。それ以外の場合の挙動は未定義です.
Original:
The first version orders memory accesses according to memory_order_seq_cst, the second version orders memory accesses according to order. order must be one of memory_order_relaxed, memory_order_consume, memory_order_acquire or memory_order_seq_cst. Otherwise the behavior is undefined.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
これは、すべての原子オブジェクト·タイプに対して定義汎用関数です。 Aアトミックオブジェクトの型である、CAに対応する非原子型で.
Original:
This is a 汎用関数 defined for all atomic object types. A is the type of an atomic object, C is the non-atomic type corresponding to A.
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 access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
order -
メモリ同期は、この操作の順序
Original:
the memory synchronization ordering for this operation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 値を返します

アトミック変数の現在の値がobjによって指さ.
Original:
The current value of the atomic variable pointed to by obj.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

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

原子オブジェクト内の値を格納します
Original:
stores a value in an atomic object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(機能) [edit]
C++ documentation for atomic_load, atomic_load_explicit