97 void lock(){ mtx.
lock(); }
106 void unlock(){ mtx.
unlock(); }
120 class FXAPI FXCondition {
124 FXCondition(
const FXCondition&);
125 FXCondition& operator=(
const FXCondition&);
135 void wait(FXMutex& mtx);
144 FXbool wait(FXMutex& mtx,FXlong nsec);
199 volatile FXThreadID tid;
204 static unsigned int CALLBACK execute(
void*);
206 static void* execute(
void*);
214 virtual FXint run() = 0;
226 FXThreadID id()
const;
238 FXbool start(
unsigned long stacksize=0);
271 static void exit(
FXint code=0);
281 static FXlong
time();
286 static void sleep(FXlong nsec);
291 static void wakeat(FXlong nsec);
303 static FXThreadID current();
308 void priority(
FXint prio);
FXString time(FXTime value)
Convert time value to date-string.
FXbool trylock()
Return TRUE if succeeded locking the mutex.
An easy way to establish a correspondence between a C++ scope and a critical section is to simply dec...
Definition: FXThread.h:76
#define FXAPI
Definition: fxdefs.h:122
A semaphore allows for protection of a resource that can be accessed by a fixed number of simultaneou...
Definition: FXThread.h:149
FXuchar FXbool
Definition: fxdefs.h:386
A condition allows one or more threads to synchronize to an event.
Definition: FXThread.h:109
FXThread provides system-independent support for threads.
Definition: FXThread.h:176
void lock()
Lock the mutex.
void unlock()
Unlock mutex.
FXbool locked()
Return TRUE if mutex is already locked.
Definition: FX4Splitter.h:31
int FXint
Definition: fxdefs.h:390
unsigned long FXThreadID
Definition: FXThread.h:32
#define FALSE
Definition: fxdefs.h:35
FXMutex provides a mutex which can be used to enforce critical sections around updates of data shared...
Definition: FXThread.h:45
unsigned long FXuval
Definition: fxdefs.h:429