From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTEvs-0004Ds-HM for qemu-devel@nongnu.org; Tue, 21 Jul 2009 08:59:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTEvp-0004Co-1M for qemu-devel@nongnu.org; Tue, 21 Jul 2009 08:59:00 -0400 Received: from [199.232.76.173] (port=50606 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTEvo-0004Cl-Pb for qemu-devel@nongnu.org; Tue, 21 Jul 2009 08:58:56 -0400 Received: from mail2.shareable.org ([80.68.89.115]:47762) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MTEvo-0005oE-8E for qemu-devel@nongnu.org; Tue, 21 Jul 2009 08:58:56 -0400 Date: Tue, 21 Jul 2009 13:58:46 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: Threads and win32 Message-ID: <20090721125846.GG20756@shareable.org> References: <385029.79398.qm@web30605.mail.mud.yahoo.com> <8A1471B6F57949CE81CD32AA843C1E14@FSCPC> <20090720160729.GA9738@amt.cnet> <20090720235246.GA15189@amt.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sebastian Herbszt Cc: Anthony Liguori , Marcelo Tosatti , qemu-devel@nongnu.org, Teemu =?iso-8859-1?Q?N=E4tkinniemi?= Sebastian Herbszt wrote: > vl.c:3873: warning: implicit declaration of function `sigaction' > vl.c:3887: error: `SIGUSR1' undeclared (first use in this function) > vl.c:3881: error: `SIGUSR2' undeclared (first use in this function) > vl.c:3882: error: `SIGIO' undeclared (first use in this function) > vl.c:3883: error: `SIGALRM' undeclared (first use in this function) It's not surprising. WIN32 doesn't have unix-style signals :-) WIN32 doesn't have pthreads either, but there's a pthread-compatibility library people often use. That provides pthreads emulation but not signal emulation. WIN32 does provide threads and locking primitives, and it's not too painful to build pthreads on t top of that. To emulate signals you really have to use Cygwin or one of the other unix-on-WIN32 emulation packages. Or change the code to not use signals. WIN32 has native async I/O, by the way. I don't know if it's suitable, especially since we found how broken Linux async I/O is despite the simple API, but Windows has had it since the early 90s (all versions derived from Windows NT) and inherited the design from VMS, so it's probably in good shape. -- Jamie