22 using namespace SLNet;
30 #if !defined(_WIN32_WCE)
41 #if defined(_WIN32_WCE) || defined(WINDOWS_PHONE_8) || defined(WINDOWS_STORE_RT)
42 int RakThread::Create( LPTHREAD_START_ROUTINE start_address,
void *arglist,
int priority)
44 int RakThread::Create(
unsigned __stdcall start_address(
void* ),
void *arglist,
int priority)
54 unsigned threadID = 0;
57 #if defined(WINDOWS_PHONE_8) || defined(WINDOWS_STORE_RT)
58 threadHandle = CreateThread(NULL,0,start_address,arglist,CREATE_SUSPENDED, 0);
59 #elif defined _WIN32_WCE
65 SetThreadPriority(threadHandle, priority);
67 #if defined(WINDOWS_PHONE_8) || defined(WINDOWS_STORE_RT)
68 ResumeThread(threadHandle);
77 CloseHandle( threadHandle );
120 pthread_t threadHandle;
124 param.sched_priority=priority;
125 pthread_attr_init( &attr );
126 pthread_attr_setschedparam(&attr, ¶m);
134 pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_DETACHED );
135 int res = pthread_create( &threadHandle, &attr, start_address, arglist );
136 RakAssert(res==0 &&
"pthread_create in RakThread.cpp failed.")