示例#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;
	}
}
示例#2
0
void* thread_start_callback(void* _t_ptr)
{
	BaseThread* t = (BaseThread*)_t_ptr;
	return t->run();

}