UbixOS
2.0
|
Go to the source code of this file.
Data Structures | |
struct | atomic_flag |
Macros | |
#define | __ATOMIC_ACQ_REL 4 |
#define | __ATOMIC_ACQUIRE 2 |
#define | __atomic_apply_stride(object, operand) (((__typeof__((object)->__val))0) + (operand)) |
#define | __ATOMIC_CONSUME 1 |
#define | __ATOMIC_RELAXED 0 |
#define | __ATOMIC_RELEASE 3 |
#define | __ATOMIC_SEQ_CST 5 |
#define | atomic_compare_exchange_strong(object, expected, desired) |
#define | atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) |
#define | atomic_compare_exchange_weak(object, expected, desired) |
#define | atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) |
#define | atomic_exchange(object, desired) atomic_exchange_explicit(object, desired, memory_order_seq_cst) |
#define | atomic_exchange_explicit(object, desired, order) |
#define | atomic_fetch_add(object, operand) atomic_fetch_add_explicit(object, operand, memory_order_seq_cst) |
#define | atomic_fetch_add_explicit(object, operand, order) |
#define | atomic_fetch_and(object, operand) atomic_fetch_and_explicit(object, operand, memory_order_seq_cst) |
#define | atomic_fetch_and_explicit(object, operand, order) ((void)(order), __sync_fetch_and_and(&(object)->__val, operand)) |
#define | atomic_fetch_or(object, operand) atomic_fetch_or_explicit(object, operand, memory_order_seq_cst) |
#define | atomic_fetch_or_explicit(object, operand, order) ((void)(order), __sync_fetch_and_or(&(object)->__val, operand)) |
#define | atomic_fetch_sub(object, operand) atomic_fetch_sub_explicit(object, operand, memory_order_seq_cst) |
#define | atomic_fetch_sub_explicit(object, operand, order) |
#define | atomic_fetch_xor(object, operand) atomic_fetch_xor_explicit(object, operand, memory_order_seq_cst) |
#define | atomic_fetch_xor_explicit(object, operand, order) ((void)(order), __sync_fetch_and_xor(&(object)->__val, operand)) |
#define | ATOMIC_FLAG_INIT { ATOMIC_VAR_INIT(0) } |
#define | atomic_init(obj, value) ((void)((obj)->__val = (value))) |
#define | atomic_is_lock_free(obj) ((void)(obj), sizeof((obj)->__val) <= sizeof(void *)) |
#define | atomic_load(object) atomic_load_explicit(object, memory_order_seq_cst) |
#define | atomic_load_explicit(object, order) ((void)(order), __sync_fetch_and_add(&(object)->__val, 0)) |
#define | atomic_store(object, desired) atomic_store_explicit(object, desired, memory_order_seq_cst) |
#define | atomic_store_explicit(object, desired, order) ((void)atomic_exchange_explicit(object, desired, order)) |
#define | ATOMIC_VAR_INIT(value) { .__val = (value) } |
Enumerations | |
enum | memory_order { memory_order_relaxed = 0, memory_order_consume = 1, memory_order_acquire = 2, memory_order_release = 3, memory_order_acq_rel = 4, memory_order_seq_cst = 5 } |
Functions | |
typedef | _Atomic (_Bool) atomic_bool |
typedef | _Atomic (char) atomic_char |
typedef | _Atomic (int) atomic_int |
typedef | _Atomic (long long) atomic_llong |
typedef | _Atomic (long) atomic_long |
typedef | _Atomic (short) atomic_short |
typedef | _Atomic (signed char) atomic_schar |
typedef | _Atomic (unsigned char) atomic_uchar |
typedef | _Atomic (unsigned int) atomic_uint |
typedef | _Atomic (unsigned long long) atomic_ullong |
typedef | _Atomic (unsigned long) atomic_ulong |
typedef | _Atomic (unsigned short) atomic_ushort |
#define __ATOMIC_ACQ_REL 4 |
Definition at line 112 of file stdatomic.h.
#define __ATOMIC_ACQUIRE 2 |
Definition at line 106 of file stdatomic.h.
#define __atomic_apply_stride | ( | object, | |
operand | |||
) | (((__typeof__((object)->__val))0) + (operand)) |
Definition at line 284 of file stdatomic.h.
#define __ATOMIC_CONSUME 1 |
Definition at line 103 of file stdatomic.h.
#define __ATOMIC_RELAXED 0 |
Definition at line 100 of file stdatomic.h.
#define __ATOMIC_RELEASE 3 |
Definition at line 109 of file stdatomic.h.
#define __ATOMIC_SEQ_CST 5 |
Definition at line 115 of file stdatomic.h.
#define atomic_compare_exchange_strong | ( | object, | |
expected, | |||
desired | |||
) |
Definition at line 343 of file stdatomic.h.
#define atomic_compare_exchange_strong_explicit | ( | object, | |
expected, | |||
desired, | |||
success, | |||
failure | |||
) |
Definition at line 286 of file stdatomic.h.
#define atomic_compare_exchange_weak | ( | object, | |
expected, | |||
desired | |||
) |
Definition at line 346 of file stdatomic.h.
#define atomic_compare_exchange_weak_explicit | ( | object, | |
expected, | |||
desired, | |||
success, | |||
failure | |||
) |
Definition at line 294 of file stdatomic.h.
#define atomic_exchange | ( | object, | |
desired | |||
) | atomic_exchange_explicit(object, desired, memory_order_seq_cst) |
Definition at line 349 of file stdatomic.h.
#define atomic_exchange_explicit | ( | object, | |
desired, | |||
order | |||
) |
Definition at line 308 of file stdatomic.h.
#define atomic_fetch_add | ( | object, | |
operand | |||
) | atomic_fetch_add_explicit(object, operand, memory_order_seq_cst) |
Definition at line 351 of file stdatomic.h.
#define atomic_fetch_add_explicit | ( | object, | |
operand, | |||
order | |||
) |
Definition at line 317 of file stdatomic.h.
#define atomic_fetch_and | ( | object, | |
operand | |||
) | atomic_fetch_and_explicit(object, operand, memory_order_seq_cst) |
Definition at line 353 of file stdatomic.h.
#define atomic_fetch_and_explicit | ( | object, | |
operand, | |||
order | |||
) | ((void)(order), __sync_fetch_and_and(&(object)->__val, operand)) |
Definition at line 320 of file stdatomic.h.
#define atomic_fetch_or | ( | object, | |
operand | |||
) | atomic_fetch_or_explicit(object, operand, memory_order_seq_cst) |
Definition at line 355 of file stdatomic.h.
#define atomic_fetch_or_explicit | ( | object, | |
operand, | |||
order | |||
) | ((void)(order), __sync_fetch_and_or(&(object)->__val, operand)) |
Definition at line 322 of file stdatomic.h.
#define atomic_fetch_sub | ( | object, | |
operand | |||
) | atomic_fetch_sub_explicit(object, operand, memory_order_seq_cst) |
Definition at line 357 of file stdatomic.h.
#define atomic_fetch_sub_explicit | ( | object, | |
operand, | |||
order | |||
) |
Definition at line 324 of file stdatomic.h.
#define atomic_fetch_xor | ( | object, | |
operand | |||
) | atomic_fetch_xor_explicit(object, operand, memory_order_seq_cst) |
Definition at line 359 of file stdatomic.h.
#define atomic_fetch_xor_explicit | ( | object, | |
operand, | |||
order | |||
) | ((void)(order), __sync_fetch_and_xor(&(object)->__val, operand)) |
Definition at line 327 of file stdatomic.h.
#define ATOMIC_FLAG_INIT { ATOMIC_VAR_INIT(0) } |
Definition at line 378 of file stdatomic.h.
#define atomic_init | ( | obj, | |
value | |||
) | ((void)((obj)->__val = (value))) |
Definition at line 90 of file stdatomic.h.
#define atomic_is_lock_free | ( | obj | ) | ((void)(obj), sizeof((obj)->__val) <= sizeof(void *)) |
Definition at line 179 of file stdatomic.h.
#define atomic_load | ( | object | ) | atomic_load_explicit(object, memory_order_seq_cst) |
Definition at line 361 of file stdatomic.h.
#define atomic_load_explicit | ( | object, | |
order | |||
) | ((void)(order), __sync_fetch_and_add(&(object)->__val, 0)) |
Definition at line 329 of file stdatomic.h.
#define atomic_store | ( | object, | |
desired | |||
) | atomic_store_explicit(object, desired, memory_order_seq_cst) |
Definition at line 363 of file stdatomic.h.
#define atomic_store_explicit | ( | object, | |
desired, | |||
order | |||
) | ((void)atomic_exchange_explicit(object, desired, order)) |
Definition at line 331 of file stdatomic.h.
#define ATOMIC_VAR_INIT | ( | value | ) | { .__val = (value) } |
Definition at line 89 of file stdatomic.h.
enum memory_order |
Enumerator | |
---|---|
memory_order_relaxed | |
memory_order_consume | |
memory_order_acquire | |
memory_order_release | |
memory_order_acq_rel | |
memory_order_seq_cst |
Definition at line 125 of file stdatomic.h.
typedef _Atomic | ( | _Bool | ) |
typedef _Atomic | ( | char | ) |
typedef _Atomic | ( | int | ) |
typedef _Atomic | ( | long long | ) |
typedef _Atomic | ( | long | ) |
typedef _Atomic | ( | short | ) |
typedef _Atomic | ( | signed char | ) |
typedef _Atomic | ( | unsigned char | ) |
typedef _Atomic | ( | unsigned int | ) |
typedef _Atomic | ( | unsigned long long | ) |
typedef _Atomic | ( | unsigned long | ) |
typedef _Atomic | ( | unsigned short | ) |