add apple-specific way of getting the thread id
This commit is contained in:
parent
b59e870fd4
commit
fe8b0105d2
|
@ -43,6 +43,10 @@ private:
|
|||
#else
|
||||
#ifdef __FreeBSD_kernel__
|
||||
if ( (syscall(SYS_thr_self, &tid)) < 0 ) // Thread/Process id
|
||||
#elif defined(__APPLE__) && defined(__MACH__)
|
||||
uint64_t tid64;
|
||||
pthread_threadid_np(NULL, &tid64);
|
||||
tid = (pid_t)tid64;
|
||||
#else
|
||||
tid=syscall(SYS_gettid);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue