12 #ifndef K_API_ATOMIC_H
13 #define K_API_ATOMIC_H
15 #include <kApi/Threads/kAtomic.x.h>
52 return xkAtomic32s_IncrementImpl(atomic);
66 return xkAtomic32s_DecrementImpl(atomic);
81 return xkAtomic32s_ExchangeImpl(atomic, value);
99 return xkAtomic32s_CompareExchangeImpl(atomic, oldValue, value);
113 return xkAtomic32s_GetImpl(atomic);
152 return xkAtomicPointer_ExchangeImpl(atomic, value);
170 return xkAtomicPointer_CompareExchangeImpl(atomic, oldValue, value);
184 return xkAtomicPointer_GetImpl(atomic);
Represents a void pointer.
k32s kAtomic32s_Increment(kAtomic32s *atomic)
Increments an atomic variable.
Definition: kAtomic.h:50
#define kInlineFx(TYPE)
Inline method declaration helper.
Definition: kApiDef.h:26
kBool kAtomic32s_CompareExchange(kAtomic32s *atomic, k32s oldValue, k32s value)
Conditionally exchanges the value of an atomic variable.
Definition: kAtomic.h:97
kBool kAtomicPointer_CompareExchange(kAtomicPointer *atomic, kPointer oldValue, kPointer value)
Conditionally exchanges the value of an atomic variable.
Definition: kAtomic.h:168
Represents a 32-bit, atomically-accessed, signed integer.
Core Zen type declarations.
Represents a 32-bit signed integer.
void kAtomicPointer_Init(kAtomicPointer *atomic, kPointer value)
Initializes an atomic variable with a particular value.
Definition: kAtomic.h:135
k32s kAtomic32s_Decrement(kAtomic32s *atomic)
Decrements an atomic variable.
Definition: kAtomic.h:64
void kAtomic32s_Init(kAtomic32s *atomic, k32s value)
Initializes an atomic variable with a particular value.
Definition: kAtomic.h:36
Represents an atomically-accessed pointer.
Represents a boolean value.
k32s kAtomic32s_Exchange(kAtomic32s *atomic, k32s value)
Exchanges the value of an atomic variable.
Definition: kAtomic.h:79
kPointer kAtomicPointer_Exchange(kAtomicPointer *atomic, kPointer value)
Exchanges the value of an atomic variable.
Definition: kAtomic.h:150
k32s kAtomic32s_Get(kAtomic32s *atomic)
Gets the current value of an atomic variable.
Definition: kAtomic.h:111
kPointer kAtomicPointer_Get(kAtomicPointer *atomic)
Gets the current value of an atomic variable.
Definition: kAtomic.h:182