예제 #1
0
DWORD WINAPI forkthreadex_r(void * arg)
{
	struct FORK_ARG *fa = (struct FORK_ARG *)arg;
	pThreadFuncEx threadcode = fa->threadcodeex;
	pThreadFuncOwner threadcodeex = (pThreadFuncOwner)fa->threadcodeex;
	void *cookie = fa->arg;
	void *owner = fa->owner;
	unsigned long rc = 0;

	Thread_Push((HINSTANCE)threadcode, fa->owner);
	SetEvent(fa->hEvent);
	if (owner)
		rc = threadcodeex(owner, cookie);
	else
		rc = threadcode(cookie);

	SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
	Thread_Pop();
	return rc;
}
예제 #2
0
파일: test.c 프로젝트: 0871087123/godot
static void *_threadcode(void *a)
{
	threadcode((int)(size_t) a);
	return 0;
}
예제 #3
0
파일: test.c 프로젝트: 0871087123/godot
static DWORD WINAPI _threadcode(LPVOID a)
{
	threadcode((int)(size_t) a);
	return 0;
}