名前空間
変種
操作

アトミック操作ライブラリ

提供: cppreference.com
< c

マクロ定数 __STDC_NO_ATOMICS__(C11) がコンパイラによって定義されている場合、ヘッダファイル <stdatomic.h>、キーワード _Atomic およびこのページに掲載されているすべての名前は提供されません。

目次

[編集]

ヘッダ <stdatomic.h> で定義
メモリの順序制約の定義
(列挙) [edit]
ロックフリーなアトミックブーリアンフラグ
(構造体) [edit]

[編集] マクロ

ヘッダ <stdatomic.h> で定義
特定のアトミック型がロックフリーかどうかを表します
(マクロ定数) [edit]
新しい atomic_flag を初期化します
(マクロ定数) [edit]
(C11)(C17で非推奨)
新しいアトミックオブジェクトを初期化します
(関数マクロ) [edit]
memory_order_consume の依存連鎖を断ちます
(関数マクロ) [edit]

[編集] 関数

ヘッダ <stdatomic.h> で定義
atomic_flag に true を設定して以前の値を返します
(関数) [edit]
atomic_flag に false を設定します
(関数) [edit]
既存のアトミックオブジェクトを初期化します
(関数) [edit]
アトミックオブジェクトがロックフリーかどうかを示します
(関数) [edit]
アトミックオブジェクトに値を書き込みます
(関数) [edit]
アトミックオブジェクトから値を読み込みます
(関数) [edit]
値とアトミックオブジェクトの値を交換します
(関数) [edit]
アトミックオブジェクトの古い値が期待値と等しければそれを新しい値と交換し、そうでなければ古い値を読み込みます
(関数) [edit]
アトミックな加算
(関数) [edit]
アトミックな減算
(関数) [edit]
アトミックなビット単位の論理和
(関数) [edit]
アトミックなビット単位の排他的論理和
(関数) [edit]
アトミックなビット単位の論理積
(関数) [edit]
汎用のメモリ順序依存のフェンス同期プリミティブ
(関数) [edit]
あるスレッドとそれと同じスレッドで実行されるシグナルハンドラの間のフェンス
(関数) [edit]

[編集]

typedef名 完全な型名
atomic_bool _Atomic _Bool
atomic_char _Atomic char
atomic_schar _Atomic signed char
atomic_uchar _Atomic unsigned char
atomic_short _Atomic short
atomic_ushort _Atomic unsigned short
atomic_int _Atomic int
atomic_uint _Atomic unsigned int
atomic_long _Atomic long
atomic_ulong _Atomic unsigned long
atomic_llong _Atomic long long
atomic_ullong _Atomic unsigned long long
atomic_char16_t _Atomic char16_t
atomic_char32_t _Atomic char32_t
atomic_wchar_t _Atomic wchar_t
atomic_int_least8_t _Atomic int_least8_t
atomic_uint_least8_t _Atomic uint_least8_t
atomic_int_least16_t _Atomic int_least16_t
atomic_uint_least16_t _Atomic uint_least16_t
atomic_int_least32_t _Atomic int_least32_t
atomic_uint_least32_t _Atomic uint_least32_t
atomic_int_least64_t _Atomic int_least64_t
atomic_uint_least64_t _Atomic uint_least64_t
atomic_int_fast8_t _Atomic int_fast8_t
atomic_uint_fast8_t _Atomic uint_fast8_t
atomic_int_fast16_t _Atomic int_fast16_t
atomic_uint_fast16_t _Atomic uint_fast16_t
atomic_int_fast32_t _Atomic int_fast32_t
atomic_uint_fast32_t _Atomic uint_fast32_t
atomic_int_fast64_t _Atomic int_fast64_t
atomic_uint_fast64_t _Atomic uint_fast64_t
atomic_intptr_t _Atomic intptr_t
atomic_uintptr_t _Atomic uintptr_t
atomic_size_t _Atomic size_t
atomic_ptrdiff_t _Atomic ptrdiff_t
atomic_intmax_t _Atomic intmax_t
atomic_uintmax_t _Atomic uintmax_t

[編集] 参考文献

  • C11 standard (ISO/IEC 9899:2011):
  • 7.17 Atomics <stdatomic.h> (p: 273-286)
  • 7.31.8 Atomics <stdatomic.h> (p: 455-456)

[編集] 関連項目

アトミック操作ライブラリC++リファレンス