aboutsummaryrefslogtreecommitdiffstats
path: root/net/yate/files/patch-engine_Thread.cpp
blob: bc72bb3894bf14cd3766b4c5c1e09815ca9b5984 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- engine/Thread.cpp.orig	2022-01-03 18:04:16 UTC
+++ engine/Thread.cpp
@@ -525,7 +525,7 @@ int ThreadPrivate::setAffinity(ThreadPrivate* t, const
 #else
     pid_t tid  = -1;
     if (!t)
-	tid = (pid_t)syscall(SYS_gettid);
+	tid = (pid_t)syscall(SYS_getpid);
     else {
 	// there is a race between getting the TID and this call
 	// try to hold off for a while, maybe it will get set
@@ -593,7 +593,7 @@ int ThreadPrivate::getAffinity(ThreadPrivate* t, DataB
 #else
     pid_t tid  = -1;
     if (!t)
-	tid = (pid_t)syscall(SYS_gettid);
+	tid = (pid_t)syscall(SYS_getpid);
     else {
 	// there is a race between getting the TID and this call
 	// try to hold off for a while, maybe it will get set