[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 0/2] Make simpletrace work on Windows

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 0/2] Make simpletrace work on Windows
Date: Fri, 09 Sep 2011 13:12:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

On 09/09/2011 11:37 AM, Stefan Hajnoczi wrote:
The 'simple' trace backend uses pthreads and does not work on Windows.  These
patches switch from pthreads to glib so that the code builds on all platforms
supported by glib.

Only one thing I'm unhappy about: the simpletrace write-out thread used to
block all signals.  I have removed that code and don't expect glib to do it for
me.  I'm not sure if there is a problem if signal handlers are invoked in the
write-out thread instead of a QEMU thread.  Any thoughts?

I am afraid of concurrent manipulation of the alarm timer info (in host_alarm_handler) if SIGALRM is triggered in the write-out thread. This would be with -clock unix. I'd just leave the pthread_sigmask code #ifdef'ed in.

By the way, I think this is the exact problem that Windows has running with the dynticks timer instead of the mmsystem timer. We can fix this particular problem by transferring host_alarm_handler's work to a bottom half, but in general I think leaving signals enabled is dangerous.


reply via email to

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