Public Member Functions | |
ThreadObject_pthread (OTTDThreadFunc proc, void *param, bool self_destruct) | |
Create a pthread and start it, calling proc(param). | |
bool | Exit () |
Exit this thread. | |
void | Join () |
Join this thread. | |
Private Member Functions | |
void | ThreadProc () |
A new thread is created, and this function is called. | |
Static Private Member Functions | |
static void * | stThreadProc (void *thr) |
On thread creation, this function is called, which calls the real startup function. | |
Private Attributes | |
pthread_t | thread |
System thread identifier. | |
OTTDThreadFunc | proc |
External thread procedure. | |
void * | param |
Parameter for the external thread procedure. | |
bool | self_destruct |
Free ourselves when done? |
Definition at line 20 of file thread_pthread.cpp.
static void* ThreadObject_pthread::stThreadProc | ( | void * | thr | ) | [inline, static, private] |
On thread creation, this function is called, which calls the real startup function.
This to get back into the correct instance again.
Definition at line 59 of file thread_pthread.cpp.
Referenced by ThreadObject_pthread().
void ThreadObject_pthread::ThreadProc | ( | ) | [inline, private] |
A new thread is created, and this function is called.
Call the custom function of the creator of the thread.
Definition at line 69 of file thread_pthread.cpp.
References param, proc, and self_destruct.