Go to the documentation of this file.
34 #define AkThreadYield() usleep(0)
44 #define AK_ATOMIC_FENCE_FULL_BARRIER() __sync_synchronize();
51 static inline int32_t
AkAtomicAdd32(
AkAtomic32* pDest, int32_t value ) {
return __sync_add_and_fetch( ( int32_t* )pDest, value ); }
52 static inline int32_t
AkAtomicSub32(
AkAtomic32* pDest, int32_t value ) {
return __sync_sub_and_fetch( ( int32_t* )pDest, value ); }
53 static inline int32_t
AkAtomicAnd32(
AkAtomic32* pDest, int32_t value ) {
return __sync_and_and_fetch( ( int32_t* )pDest, value ); }
54 static inline int32_t
AkAtomicOr32(
AkAtomic32* pDest, int32_t value ) {
return __sync_or_and_fetch( ( int32_t* )pDest, value ); }
55 static inline int AkAtomicCas32(
AkAtomic32* pDest, int32_t proposed, int32_t expected ) {
return __sync_bool_compare_and_swap( ( int32_t* )pDest, expected, proposed ); }
62 static inline int64_t
AkAtomicAdd64(
AkAtomic64* pDest, int64_t value ) {
return __sync_add_and_fetch( ( int64_t* )pDest, value ); }
63 static inline int64_t
AkAtomicSub64(
AkAtomic64* pDest, int64_t value ) {
return __sync_sub_and_fetch( ( int64_t* )pDest, value ); }
64 static inline int64_t
AkAtomicAnd64(
AkAtomic64* pDest, int64_t value ) {
return __sync_and_and_fetch( ( int64_t* )pDest, value ); }
65 static inline int64_t
AkAtomicOr64(
AkAtomic64* pDest, int64_t value ) {
return __sync_or_and_fetch( ( int64_t* )pDest, value ); }
66 static inline int AkAtomicCas64(
AkAtomic64* pDest, int64_t proposed, int64_t expected ) {
return __sync_bool_compare_and_swap( ( int64_t* )pDest, expected, proposed ); }
71 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