Since glibc does not provide a gettid call directly, only through syscall, we wrap one for kvm
Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- qemu/qemu-kvm.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index 43e0f2e..8ee3bf8 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -19,6 +19,7 @@ int kvm_irqchip = 1; #include <libkvm.h> #include <pthread.h> #include <sys/utsname.h> +#include <sys/syscall.h> extern void perror(const char *s); @@ -50,6 +51,11 @@ struct vcpu_info { int thread_id; } vcpu_info[256]; +static inline unsigned long kvm_get_thread_id(void) +{ + return syscall(SYS_gettid); +} + CPUState *qemu_kvm_cpu_env(int index) { return vcpu_info[index].env; -- 1.5.0.6 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel