From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HVX1m-0000lq-HB for qemu-devel@nongnu.org; Sun, 25 Mar 2007 14:01:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HVX1c-0000fG-5z for qemu-devel@nongnu.org; Sun, 25 Mar 2007 14:01:14 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HVX1b-0000f5-NZ for qemu-devel@nongnu.org; Sun, 25 Mar 2007 13:01:03 -0500 Received: from wx-out-0506.google.com ([66.249.82.234]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HVWzN-0000Kg-4d for qemu-devel@nongnu.org; Sun, 25 Mar 2007 13:58:49 -0400 Received: by wx-out-0506.google.com with SMTP id i30so2830295wxd for ; Sun, 25 Mar 2007 10:58:04 -0700 (PDT) Message-ID: <4606B829.90800@codemonkey.ws> Date: Sun, 25 Mar 2007 12:58:01 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Implement Win32 locking in vl.c (create_pidfile). References: <20070323231014.GR26700@lios> In-Reply-To: <20070323231014.GR26700@lios> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: carlos@codesourcery.com Carlos O'Donell wrote: > The following patch implements Win32 locking for vl.c (create_pidfile). > Builds for mingw32, and tested on a Windows Server 2003 host by running > two qemu's with the same -pidfile option. > > When cross-compiling the use of --enable-mingw32 should effect AIOLIBS, > otherwise the build will use "-lrt" and this is not valid when compiling > with mingw32. > Instead of using an #ifdef, I think it would be better to have a win32 specific file and a unix specific file that compiles conditionally depending on the host. Sort of like and osdep-posix.c and and osdep-win32.c. Both would implement a create_pidfile() function. I think this general approach would help clean up a lot of the win32 code. Thoughts? Regards, Anthony Liguori > Patch attached for both. Built on linux and tested on Windows Server > 2003. > > Comments? Please include me in the CC. > > Cheers, > Carlos. >