This is the documentation for Enlighten.
module Concurrency
Classes
Name | Description |
|---|---|
Basic wrapper around a critical section object. | |
Event that can be manually triggered. | |
Event for handling input messages. | |
A simple utility for aquiring a lock for the duration of a function. | |
Cross platform Event class. |
Typedefs
Name | Description |
|---|---|
void * GeoThreadHandle | When threading is unavailable, just use a void* as the unsupported type. |
u32 GeoThreadResult | Return type of a thread function. |
GeoThreadResult(GEO_THREAD_CALLING_CONV * GeoThreadStartRoutine)(void *lpThreadParameter) | Thread start function prototype. |
Variables
Name | Description |
|---|---|
const GeoThreadHandle GEO_INVALID_THREAD_HANDLE | A thread handle value that is never valid. |
Functions
Name | Description |
|---|---|
Platform specific thread creation function. | |
Platform specific thread accessor function. | |
Atomically add amount to value pointed to by addend, returns the new value. | |
Atomically add amount to value pointed to by addend, returns the new value. | |
Atomically decrement value pointed to by addend, returns the new value. | |
Atomically sets a value, and returns its previous value. | |
Atomically sets a value, and returns its previous value. | |
Atomically increment value pointed to by addend, returns the new value. | |
Atomically increment value pointed to by addend, returns the new value. | |
Atomically subtract amount to value pointed to by addend, returns new value. | |
Platform specific thread release function. | |
Platform specific thread resume function. | |
Platform specific set thread affinity function. | |
Platform specific thread sleep function. | |
Platform specific thread comparison function. | |
Platform specific thread wait function. | |
Platform specific thread yield function. |
Defines
Name | Description |
|---|---|
GEO_ATOMIC_IMPLEMENTED 0 | Set to 1 on platforms where Atomic operations are available. |
GEO_THREAD_CALLING_CONV | Calling convention of GeoThread function. |
GEO_THREADING_IMPLEMENTED 0 | Set to 0 on platforms where Posix style threading methods are not available. |
GeoThreadHandle Geo::GeoCreateThread
public: GeoThreadHandle GeoCreateThread
(
GeoThreadStartRoutine function,
void * data
)
Platform specific thread creation function.
GeoThreadHandle Geo::GeoGetCurrentThreadHandle
public: GeoThreadHandle GeoGetCurrentThreadHandle()
Platform specific thread accessor function.
s32 Geo::GeoInterlockedAdd32
public: s32 GeoInterlockedAdd32
(
GeoAtomic< u32 > & addend,
u32 amount
)
Atomically add amount to value pointed to by addend, returns the new value.
s64 Geo::GeoInterlockedAdd64
public: s64 GeoInterlockedAdd64
(
GeoAtomic< s64 > & addend,
s64 amount
)
Atomically add amount to value pointed to by addend, returns the new value.
s32 Geo::GeoInterlockedDec32
public: s32 GeoInterlockedDec32
(
GeoAtomic< u32 > & addend
)
Atomically decrement value pointed to by addend, returns the new value.
u32 Geo::GeoInterlockedExchange32
public: u32 GeoInterlockedExchange32
(
GeoAtomic< u32 > & target,
u32 value
)
Atomically sets a value, and returns its previous value.
u64 Geo::GeoInterlockedExchange64
public: u64 GeoInterlockedExchange64
(
GeoAtomic< u64 > & target,
u64 value
)
Atomically sets a value, and returns its previous value.
s32 Geo::GeoInterlockedInc32
public: s32 GeoInterlockedInc32
(
GeoAtomic< u32 > & addend
)
Atomically increment value pointed to by addend, returns the new value.
s64 Geo::GeoInterlockedInc64
public: s64 GeoInterlockedInc64
(
GeoAtomic< s64 > & addend
)
Atomically increment value pointed to by addend, returns the new value.
s32 Geo::GeoInterlockedSub32
public: s32 GeoInterlockedSub32
(
GeoAtomic< u32 > & addend,
u32 amount
)
Atomically subtract amount to value pointed to by addend, returns new value.
void Geo::GeoReleaseThread
public: void GeoReleaseThread
(
GeoThreadHandle thread
)
Platform specific thread release function.
void Geo::GeoResumeThread
public: void GeoResumeThread
(
GeoThreadHandle thread
)
Platform specific thread resume function.
void Geo::GeoSetThreadAffinity
public: void GeoSetThreadAffinity
(
GeoThreadHandle thread,
Geo::u64 affinity
)
Platform specific set thread affinity function.
void Geo::GeoSleepThread
public: void GeoSleepThread
(
u32 ms
)
Platform specific thread sleep function.
bool Geo::GeoThreadEqual
public: bool GeoThreadEqual
(
GeoThreadHandle a,
GeoThreadHandle b
)
Platform specific thread comparison function.
void Geo::GeoWaitThread
public: void GeoWaitThread
(
GeoThreadHandle thread
)
Platform specific thread wait function.
void Geo::GeoYieldThread
public: void GeoYieldThread()
Platform specific thread yield function.