On 10/21/2010 12:03 AM, Anthony Liguori wrote:

The timeout of qemu_kvm_eat_signal is always zero.

So then qemu_kvm_eat_signal purely polls and it will happily keep
polling as long as there is a signal pending.

So what's the point of doing a sigtimedwait() and dropping qemu_mutex?

I agree that keeping the qemu_mutex makes sense if you remove the timeout argument (which I even have a patch for, as part of my Win32 iothread series). Until there is the theoretical possibility of suspending the process, qemu_kvm_eat_signal should drop the mutex.

Why not just check sigpending in a loop?

Because sigtimedwait eats the signal, unlike sigpending (and sigsuspend).

Reply via email to