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