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);
116 #if !defined(K_WINDOWS) || defined(_WIN64)
153 return xkAtomic64s_IncrementImpl(atomic);
167 return xkAtomic64s_DecrementImpl(atomic);
182 return xkAtomic64s_ExchangeImpl(atomic, value);
200 return xkAtomic64s_CompareExchangeImpl(atomic, oldValue, value);
214 return xkAtomic64s_GetImpl(atomic);
255 return xkAtomicPointer_ExchangeImpl(atomic, value);
273 return xkAtomicPointer_CompareExchangeImpl(atomic, oldValue, value);
287 return xkAtomicPointer_GetImpl(atomic);
Represents a void pointer.
k32s kAtomic32s_Increment(kAtomic32s *atomic)
Increments an atomic variable.
Definition: kAtomic.h:50
void kAtomic64s_Init(kAtomic64s *atomic, k64s value)
Initializes an atomic variable with a particular value.
Definition: kAtomic.h:137
k64s kAtomic64s_Increment(kAtomic64s *atomic)
Increments an atomic variable.
Definition: kAtomic.h:151
#define kInlineFx(TYPE)
Inline method declaration helper.
Definition: kApiDef.h:29
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:271
Represents a 64-bit, atomically-accessed, signed integer.
k64s kAtomic64s_Get(kAtomic64s *atomic)
Gets the current value of an atomic variable.
Definition: kAtomic.h:212
Represents a 32-bit, atomically-accessed, signed integer.
k64s kAtomic64s_Exchange(kAtomic64s *atomic, k64s value)
Exchanges the value of an atomic variable.
Definition: kAtomic.h:180
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:238
k64s kAtomic64s_Decrement(kAtomic64s *atomic)
Decrements an atomic variable.
Definition: kAtomic.h:165
Represents a 64-bit signed integer.
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:253
k32s kAtomic32s_Get(kAtomic32s *atomic)
Gets the current value of an atomic variable.
Definition: kAtomic.h:111
kBool kAtomic64s_CompareExchange(kAtomic64s *atomic, k64s oldValue, k64s value)
Conditionally exchanges the value of an atomic variable.
Definition: kAtomic.h:198
kPointer kAtomicPointer_Get(kAtomicPointer *atomic)
Gets the current value of an atomic variable.
Definition: kAtomic.h:285