module Concurrency

This is the documentation for Enlighten.

module Concurrency

Classes

Name

Description

Name

Description

Geo::GeoCriticalSection

Basic wrapper around a critical section object.

Geo::GeoEvent

Event that can be manually triggered.

Geo::GeoScopedCSection

A simple utility for aquiring a lock for the duration of a function.

Geo::IGeoEvent

Cross platform Event class.

Typedefs

Name

Description

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

Name

Description

const GeoThreadHandle GEO_INVALID_THREAD_HANDLE

A thread handle value that is never valid.

Functions

Name

Description

Name

Description

GeoCreateThread(GeoThreadStartRoutine, void *)

Platform specific thread creation function.

GeoGetCurrentThreadHandle()

Platform specific thread accessor function.

GeoInterlockedAdd32(GeoAtomic< u32 > &, u32)

Atomically add amount to value pointed to by addend, returns the new value.

GeoInterlockedAdd64(GeoAtomic< s64 > &, s64)

Atomically add amount to value pointed to by addend, returns the new value.

GeoInterlockedDec32(GeoAtomic< u32 > &)

Atomically decrement value pointed to by addend, returns the new value.

GeoInterlockedExchange32(GeoAtomic< u32 > &, u32)

Atomically sets a value, and returns its previous value.

GeoInterlockedExchange64(GeoAtomic< u64 > &, u64)

Atomically sets a value, and returns its previous value.

GeoInterlockedInc32(GeoAtomic< u32 > &)

Atomically increment value pointed to by addend, returns the new value.

GeoInterlockedInc64(GeoAtomic< s64 > &)

Atomically increment value pointed to by addend, returns the new value.

GeoInterlockedSub32(GeoAtomic< u32 > &, u32)

Atomically subtract amount to value pointed to by addend, returns new value.

GeoReleaseThread(GeoThreadHandle)

Platform specific thread release function.

GeoResumeThread(GeoThreadHandle)

Platform specific thread resume function.

GeoSetThreadAffinity(GeoThreadHandle, Geo::u64)

Platform specific set thread affinity function.

GeoSleepThread(u32)

Platform specific thread sleep function.

GeoThreadEqual(GeoThreadHandle, GeoThreadHandle)

Platform specific thread comparison function.

GeoWaitThread(GeoThreadHandle)

Platform specific thread wait function.

GeoYieldThread()

Platform specific thread yield function.

Defines

Name

Description

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.