summaryrefslogtreecommitdiff
path: root/tests/core_auth.c
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2019-04-23 18:50:56 -0400
committerLyude Paul <lyude@redhat.com>2019-05-07 17:37:56 -0400
commit998288337d87b9fac8ae3a2f06ee97bfa9bfdfa3 (patch)
tree01cf7f5109a92232da85b3ff50343b3106c31dc6 /tests/core_auth.c
parent71a46ea98a946437993b16b1cb2433f85d19a94e (diff)
Use gettid() wrapper everywhere
Currently we have multiple different parts of IGT that define their own wrapper around the gettid() syscall (or just call it directly with no wrapper). Additionally, add the appropriate #includes for igt_aux.h to make sure syscall() is available. Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'tests/core_auth.c')
-rw-r--r--tests/core_auth.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/core_auth.c b/tests/core_auth.c
index 1bdc2261..49cad7cd 100644
--- a/tests/core_auth.c
+++ b/tests/core_auth.c
@@ -46,9 +46,7 @@
#include <sys/sysmacros.h>
#include "drm.h"
-#ifdef __linux__
-# include <sys/syscall.h>
-#else
+#ifndef __linux__
# include <pthread.h>
#endif
@@ -62,7 +60,7 @@ is_local_tid(pid_t tid)
#else
/* On Linux systems, drmGetClient() would return the thread ID
instead of the actual process ID */
- return syscall(SYS_gettid) == tid;
+ return gettid() == tid;
#endif
}