From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: [PATCH 3/8] get thread id at thread's creation Date: Tue, 4 Mar 2008 13:21:56 -0300 Message-ID: <1204647737666-git-send-email-gcosta@redhat.com> References: <12046477213193-git-send-email-gcosta@redhat.com> <12046477274124-git-send-email-gcosta@redhat.com> <1204647732256-git-send-email-gcosta@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: chrisw@sous-sol.org, avi@qumranet.com, Glauber Costa To: kvm-devel@lists.sourceforge.net Return-path: In-Reply-To: <1204647732256-git-send-email-gcosta@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org store the thread id through our new call as soon as the process is created. Signed-off-by: Glauber Costa --- qemu/qemu-kvm.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index 8ee3bf8..1aeb97b 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -335,6 +335,7 @@ static void *ap_main_loop(void *_env) vcpu = &vcpu_info[env->cpu_index]; vcpu->env = env; + vcpu->thread_id = kvm_get_thread_id(); sigfillset(&signals); //sigdelset(&signals, SIG_IPI); sigprocmask(SIG_BLOCK, &signals, NULL); @@ -381,6 +382,7 @@ int kvm_init_ap(void) vcpu = &vcpu_info[0]; vcpu->env = first_cpu; + vcpu->thread_id = kvm_get_thread_id(); signal(SIG_IPI, sig_ipi_handler); for (i = 1; i < smp_cpus; ++i) { kvm_init_new_ap(i, 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/