On Sun, Mar 09, 2008 at 11:26:43AM +0200, Gilad Ben-Yossef wrote:
> 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, this patch is the generic QEMU code, which is single threaded, so
using getpid() is correct. Glauber  has a separate patch in this series
which implements the equivalent for KVM which does indeed use gettid()

Regards,
Dan.
-- 
|: Red Hat, Engineering, Boston   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

-------------------------------------------------------------------------
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

Reply via email to