Go to the documentation of this file.
42 #define AK_ATOMIC_FENCE_FULL_BARRIER() __sync_synchronize();
49 static inline int32_t
AkAtomicAdd32(
AkAtomic32* pDest, int32_t value ) {
return __sync_add_and_fetch( ( int32_t* )pDest, value ); }
50 static inline int32_t
AkAtomicSub32(
AkAtomic32* pDest, int32_t value ) {
return __sync_sub_and_fetch( ( int32_t* )pDest, value ); }
51 static inline int AkAtomicCas32(
AkAtomic32* pDest, int32_t proposed, int32_t expected ) {
return __sync_bool_compare_and_swap( ( int32_t* )pDest, expected, proposed ); }
58 static inline int64_t
AkAtomicAdd64(
AkAtomic64* pDest, int64_t value ) {
return __sync_add_and_fetch( ( int64_t* )pDest, value ); }
59 static inline int64_t
AkAtomicSub64(
AkAtomic64* pDest, int64_t value ) {
return __sync_sub_and_fetch( ( int64_t* )pDest, value ); }
60 static inline int AkAtomicCas64(
AkAtomic64* pDest, int64_t proposed, int64_t expected ) {
return __sync_bool_compare_and_swap( ( int64_t* )pDest, expected, proposed ); }
65 static inline int AkAtomicCasPtr(
AkAtomicPtr* pDest,
void* proposed,
void* expected ) {
return __sync_bool_compare_and_swap( (
void** )pDest, expected, proposed ); }
Tell us about your project. We're here to help.
Register your project and we'll help you get started with no strings attached!
Get started with Wwise