Re: [Qemu-devel] Re: [PATCH 1/3] Introduce threadlets

2010-10-19 Thread Paolo Bonzini
On 10/19/2010 09:12 PM, Balbir Singh wrote: > >Ideally you need > > > > s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); > > > > But qemu will need to wrap this around as well. > > Why? QEMU is never using thread cancellation. Yes, I agree, in the longer run, cancellation is

Re: [Qemu-devel] Re: [PATCH 1/3] Introduce threadlets

2010-10-19 Thread Balbir Singh
* Paolo Bonzini [2010-10-19 21:01:03]: > On 10/19/2010 08:36 PM, Balbir Singh wrote: > >Ideally you need > > > > s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); > > > >But qemu will need to wrap this around as well. > > Why? QEMU is never using thread cancellation. > Yes, I a

[Qemu-devel] Re: [PATCH 1/3] Introduce threadlets

2010-10-19 Thread Paolo Bonzini
On 10/19/2010 08:36 PM, Balbir Singh wrote: Ideally you need s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); But qemu will need to wrap this around as well. Why? QEMU is never using thread cancellation. Paolo

[Qemu-devel] Re: [PATCH 1/3] Introduce threadlets

2010-10-15 Thread Paolo Bonzini
On 10/14/2010 11:02 AM, Stefan Hajnoczi wrote: 2. Moving qemu_cond_signal() outside queue->lock is dangerous for the same reason: you need to be careful not to qemu_cond_signal() when the thread isn't inside qemu_cond_timedwait()." Yes, please do so. I personally consider it bad programming pr