Beispiel #1
0
void * BaseThread::entryPoint(void * self)
{
	BaseThread * th = reinterpret_cast<BaseThread *>(self);
	if (NULL == self) {
		return (void *)-1;
	} else {
#		if defined(WIN32)
		th->id = thread::CurrentThreadId();
#		endif /* defined(WIN32) */
		th->_exitCode = th->run(th->arg());
		th->setRunning(false);
		return th->_exitCode;
	}
}
void* thread_start_callback(void* _t_ptr)
{
	BaseThread* t = (BaseThread*)_t_ptr;
	return t->run();

}