|
|
@ -107,12 +107,12 @@ void nlSleep( uint32 ms )
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Returns Thread Id (note: on Linux, Process Id is the same as the Thread Id)
|
|
|
|
* Returns Thread Id (note: on Linux, Process Id is the same as the Thread Id)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
uint getThreadId()
|
|
|
|
size_t getThreadId()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#ifdef NL_OS_WINDOWS
|
|
|
|
#ifdef NL_OS_WINDOWS
|
|
|
|
return GetCurrentThreadId();
|
|
|
|
return GetCurrentThreadId();
|
|
|
|
#elif defined NL_OS_UNIX
|
|
|
|
#elif defined NL_OS_UNIX
|
|
|
|
return uint(pthread_self());
|
|
|
|
return size_t(pthread_self());
|
|
|
|
// doesnt work on linux kernel 2.6 return getpid();
|
|
|
|
// doesnt work on linux kernel 2.6 return getpid();
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|