Use pthread calls instead of raw syscalls on non-Linux systems

Raw system calls aren't portable to other kernels.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Alan Coopersmith
2014-12-23 19:07:10 -08:00
committed by Daniel Vetter
parent cf93bc8df9
commit 99e6defbe7
3 changed files with 27 additions and 6 deletions
+4
View File
@@ -121,7 +121,11 @@ static void start_test(void)
static void * test_thread(void * par)
{
#ifdef __linux__
igt_debug("start %ld\n", syscall(SYS_gettid));
#else
igt_debug("start %ld\n", (long) pthread_self());
#endif
start_test();
return NULL;