Go to the source code of this file.
◆ __TBB_atomic_H
◆ __TBB_atomic_H_include_area
#define __TBB_atomic_H_include_area |
◆ __TBB_DECL_ATOMIC_FIELD
#define __TBB_DECL_ATOMIC_FIELD |
( |
|
t, |
|
|
|
f, |
|
|
|
a |
|
) |
| alignas(a) t f; |
◆ __TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES
#define __TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES |
( |
|
M | ) |
|
Value: template<> struct atomic_load_store_traits<M> { \
template <typename T> \
inline
static T
load(
const volatile T& location ) { \
return __TBB_load_##M( location ); \
} \
template <typename T> \
inline
static void store(
volatile T& location, T
value ) { \
__TBB_store_##M( location,
value ); \
} \
}
Definition at line 176 of file atomic.h.
◆ __TBB_DECL_ATOMIC_PRIMITIVES
#define __TBB_DECL_ATOMIC_PRIMITIVES |
( |
|
S | ) |
|
Value: template<memory_semantics M> \
struct atomic_traits<S,M> { \
inline
static word compare_and_swap(
volatile void* location,
word new_value,
word comparand ) { \
return __TBB_machine_cmpswp##
S(location,new_value,comparand); \
} \
inline
static word fetch_and_add(
volatile void* location,
word addend ) { \
return __TBB_machine_fetchadd##
S(location,addend); \
} \
inline
static word fetch_and_store(
volatile void* location,
word value ) { \
return __TBB_machine_fetchstore##
S(location,
value); \
} \
};
Definition at line 158 of file atomic.h.
◆ __TBB_DECL_FENCED_ATOMIC_PRIMITIVES
#define __TBB_DECL_FENCED_ATOMIC_PRIMITIVES |
( |
|
S, |
|
|
|
M |
|
) |
| |
Value: template<>
struct atomic_traits<
S,M> { \
inline
static word compare_and_swap(
volatile void* location,
word new_value,
word comparand ) { \
return __TBB_machine_cmpswp##
S##M(location,new_value,comparand); \
} \
inline
static word fetch_and_add(
volatile void* location,
word addend ) { \
return __TBB_machine_fetchadd##
S##M(location,addend); \
} \
inline
static word fetch_and_store(
volatile void* location,
word value ) { \
return __TBB_machine_fetchstore##
S##M(location,
value); \
} \
};
Definition at line 144 of file atomic.h.
◆ __TBB_LONG_LONG
#define __TBB_LONG_LONG long long |
◆ __TBB_MINUS_ONE
#define __TBB_MINUS_ONE |
( |
|
T | ) |
(T(T(0)-T(1))) |
Additive inverse of 1 for type T.
Various compilers issue various warnings if -1 is used with various integer types. The baroque expression below avoids all the warnings (we hope).
Definition at line 224 of file atomic.h.
◆ ATOMIC_STORAGE_PARTIAL_SPECIALIZATION
#define ATOMIC_STORAGE_PARTIAL_SPECIALIZATION |
( |
|
S | ) |
|
Value: template<typename value_type> \
struct aligned_storage<value_type,S> { \
__TBB_DECL_ATOMIC_FIELD(value_type,my_value,
S) \
}; \
Definition at line 118 of file atomic.h.