#include <stdint.h>
#include <unistd.h>
Go to the source code of this file.
◆ __TBB_acquire_consistency_helper
#define __TBB_acquire_consistency_helper |
( |
| ) |
__sync_synchronize() |
As this generic implementation has absolutely no information about underlying hardware, its performance most likely will be sub-optimal because of full memory fence usages where a more lightweight synchronization means (or none at all) could suffice. Thus if you use this header to enable TBB on a new platform, consider forking it and relaxing below helpers as appropriate.
Definition at line 57 of file gcc_generic.h.
◆ __TBB_AtomicAND
◆ __TBB_AtomicOR
◆ __TBB_control_consistency_helper
#define __TBB_control_consistency_helper |
( |
| ) |
__sync_synchronize() |
◆ __TBB_ENDIANNESS
FPU control setting not available for non-Intel architectures on Android
Definition at line 46 of file gcc_generic.h.
◆ __TBB_full_memory_fence
#define __TBB_full_memory_fence |
( |
| ) |
__sync_synchronize() |
◆ __TBB_Log2
◆ __TBB_MACHINE_DEFINE_ATOMICS
#define __TBB_MACHINE_DEFINE_ATOMICS |
( |
|
S, |
|
|
|
T |
|
) |
| |
Value:inline T __TBB_machine_cmpswp##
S(
volatile void *ptr, T
value, T comparand ) { \
return __sync_val_compare_and_swap(
reinterpret_cast<volatile T *
>(ptr),comparand,
value); \
} \
inline T __TBB_machine_fetchadd##
S(
volatile void *ptr, T
value ) { \
return __sync_fetch_and_add(
reinterpret_cast<volatile T *
>(ptr),
value); \
}
Definition at line 62 of file gcc_generic.h.
◆ __TBB_release_consistency_helper
#define __TBB_release_consistency_helper |
( |
| ) |
__sync_synchronize() |
◆ __TBB_TryLockByte
◆ __TBB_UnlockByte
◆ __TBB_USE_GENERIC_FETCH_STORE
#define __TBB_USE_GENERIC_FETCH_STORE 1 |
◆ __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE
#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 |
◆ __TBB_USE_GENERIC_RELAXED_LOAD_STORE
#define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 |
◆ __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE
#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 |
◆ __TBB_WORDSIZE
#define __TBB_WORDSIZE __SIZEOF_POINTER__ |
◆ __TBB_atomic_flag
◆ __TBB_Flag
◆ __TBB_machine_and()
static void __TBB_machine_and |
( |
volatile void * |
ptr, |
|
|
uintptr_t |
addend |
|
) |
| |
|
inlinestatic |
Definition at line 120 of file gcc_generic.h.
121 __sync_fetch_and_and(
reinterpret_cast<volatile uintptr_t *
>(ptr),addend);
◆ __TBB_machine_lg()
static intptr_t __TBB_machine_lg |
( |
uintptr_t |
x | ) |
|
|
inlinestatic |
◆ __TBB_machine_or()
static void __TBB_machine_or |
( |
volatile void * |
ptr, |
|
|
uintptr_t |
addend |
|
) |
| |
|
inlinestatic |
Definition at line 116 of file gcc_generic.h.
117 __sync_fetch_and_or(
reinterpret_cast<volatile uintptr_t *
>(ptr),addend);
◆ __TBB_machine_try_lock_byte()
Definition at line 124 of file gcc_generic.h.
125 return __sync_lock_test_and_set(&flag,1)==0;
◆ __TBB_machine_unlock_byte()