qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 08/12] qemu-thread: report RCU quiescent states


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 08/12] qemu-thread: report RCU quiescent states
Date: Thu, 16 May 2013 10:43:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

Il 16/05/2013 10:33, liu ping fan ha scritto:
>> > +Luckily, in most cases no manual annotation is needed, because waiting
>> > +on condition variables (qemu_cond_wait), semaphores (qemu_sem_wait,
>> > +qemu_sem_timedwait) or events (qemu_event_wait) implicitly marks the 
>> > thread
>> > +as quiescent for the whole duration of the wait.  (There is an exception
>> > +for semaphore waits with a zero timeout).
>> > +
> Why not the same rule for zero timeout?
> 

Because they are not really doing synchronization, they are basically an
"atomic_dec_if_not_zero" on the semaphore count.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]