From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gilad Ben-Yossef Subject: Re: [Qemu-devel] [PATCH] use a thread id variable Date: Sun, 09 Mar 2008 11:26:43 +0200 Message-ID: <47D3AD53.6030809@codefidence.com> References: <12047472711034-git-send-email-gcosta@redhat.com> <12047472772114-git-send-email-gcosta@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, chrisw@sous-sol.org, Glauber Costa To: qemu-devel@nongnu.org Return-path: In-Reply-To: <12047472772114-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 Glauber Costa wrote: > This patch introduces a "thread_id" variable to CPUState. > It's duty will be to hold the process, or more generally, thread > id of the current executing cpu > > env->nb_watchpoints = 0; > +#ifdef __WIN32 > + env->thread_id = GetCurrentProcessId(); > +#else > + env->thread_id = getpid(); > +#endif > *penv = env; hmm... maybe I'm missing something, but in Linux at least I think you would prefer this to be gettid() rather then getpid as each CPU has it's own thread, not a different process. No? Gilad -- Gilad Ben-Yossef Chief Coffee Drinker Codefidence Ltd. | Web: http://codefidence.com Work: +972-3-7515563 ext. 201 | Mobile: +972-52-8260388 "Your hovercraft is full of eels. For information on emptying your hovercraft, turn to Section 2.6.a.17 of your hovercraft user manual". - The Monty Python technical writer ------------------------------------------------------------------------- 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/