We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed8dcd4 commit 0c5db1cCopy full SHA for 0c5db1c
src/tfcore_unix.h
@@ -7,6 +7,9 @@
7
#include <sys/wait.h>
8
#include <fcntl.h>
9
#include <aio.h>
10
+#ifdef Q_OS_DARWIN
11
+#include <pthread.h>
12
+#endif
13
#include "tfcore.h"
14
15
#ifndef Q_OS_UNIX
@@ -25,7 +28,10 @@ static inline pid_t gettid()
25
28
#if defined(Q_OS_LINUX)
26
29
return syscall(SYS_gettid);
27
30
#elif defined(Q_OS_DARWIN)
- return syscall(SYS_thread_selfid);
31
+ uint64_t tid;
32
+ pthread_threadid_np(NULL, &tid);
33
+ return tid;
34
+ //return syscall(SYS_thread_selfid);
35
#else
36
return 0;
37
#endif
0 commit comments