12 #include "../stdafx.h" 15 #include "../safeguards.h" 19 if (thread != NULL) *thread = NULL;
void(* OTTDThreadFunc)(void *)
Definition of all thread entry functions.
virtual void WaitForSignal()
Wait for a signal to be send.
virtual void BeginCritical(bool allow_recursive=false)
Begin the critical section.
virtual void EndCritical(bool allow_recursive=false)
End of the critical section.
Mutex that doesn't do locking because it ain't needed when there're no threads.
static ThreadMutex * New()
Create a new mutex.
virtual void SendSignal()
Send a signal and wake the 'thread' that was waiting for it.
A Thread Object which works on all our supported OSes.
static bool New(OTTDThreadFunc proc, void *param, ThreadObject **thread=NULL, const char *name=NULL)
Create a thread; proc will be called as first function inside the thread, with optional params...