2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-02 07:15:31 +00:00

zdtm: simplify sys_gettid

It fix compilation on x32

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin
2012-06-28 18:32:00 +04:00
committed by Pavel Emelyanov
parent 2c978d84d3
commit 877f8c8276

View File

@@ -5,6 +5,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
#include <linux/unistd.h>
#include <time.h> #include <time.h>
#include "zdtmtst.h" #include "zdtmtst.h"
@@ -13,15 +14,7 @@
static long sys_gettid(void) static long sys_gettid(void)
{ {
long ret; return syscall(__NR_gettid);
asm volatile("movl $186, %%eax \n"
"syscall \n"
"movq %%rax, %0 \n"
: "=r"(ret)
:
: "rax", "memory");
return ret;
} }
void task_waiter_init(task_waiter_t *t) void task_waiter_init(task_waiter_t *t)