From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STqow-000736-Fz for qemu-devel@nongnu.org; Mon, 14 May 2012 04:39:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1STqor-0007Ed-Qe for qemu-devel@nongnu.org; Mon, 14 May 2012 04:39:58 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:37109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STqor-0007ER-He for qemu-devel@nongnu.org; Mon, 14 May 2012 04:39:53 -0400 Received: by pbbro12 with SMTP id ro12so8238123pbb.4 for ; Mon, 14 May 2012 01:39:50 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4FB0C4D0.1050909@redhat.com> Date: Mon, 14 May 2012 10:39:44 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] sigaction in windows List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: bang bang Cc: qemu-devel@nongnu.org Il 14/05/2012 05:47, bang bang ha scritto: > Hi, everyone: > I am very sorry to trouble you, but I have a question that need > your help. As we know, sigaction is not defined in windows, but qemu can > run on windows, I want to know how the qemu to implement sigaction so > that it can run on windows an linux. I am very sorry to not find their > implementation with windows. It doesn't use sigaction. :) Whenever the POSIX version would send a signal to a thread, the Windows version does the following: - call SuspendThread on the receiving thread; - execute the signal handler code in the sending thread; - call ResumeThread on the receiving thread. It is not exactly the same thing, but it is enough for QEMU's needs. Paolo