From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1z0i-0000Qp-1e for qemu-devel@nongnu.org; Fri, 09 Sep 2011 07:12:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1z0h-0004QG-1m for qemu-devel@nongnu.org; Fri, 09 Sep 2011 07:12:40 -0400 Received: from mail-vx0-f173.google.com ([209.85.220.173]:40375) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1z0g-0004Q6-VW for qemu-devel@nongnu.org; Fri, 09 Sep 2011 07:12:39 -0400 Received: by vxj15 with SMTP id 15so666342vxj.4 for ; Fri, 09 Sep 2011 04:12:38 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4E69F4A2.3070405@redhat.com> Date: Fri, 09 Sep 2011 13:12:34 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1315561022-25386-1-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1315561022-25386-1-git-send-email-stefanha@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/2] Make simpletrace work on Windows List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Jan Kiszka , qemu-devel@nongnu.org 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. Paolo