From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwxDu-0004Je-9n for qemu-devel@nongnu.org; Mon, 13 Feb 2012 09:49:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwxDk-0006Gx-Sj for qemu-devel@nongnu.org; Mon, 13 Feb 2012 09:49:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25269) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwxDk-0006Gr-EN for qemu-devel@nongnu.org; Mon, 13 Feb 2012 09:49:36 -0500 Date: Mon, 13 Feb 2012 14:49:28 +0000 From: "Daniel P. Berrange" Message-ID: <20120213144928.GL32182@redhat.com> References: <1329144150-7720-1-git-send-email-abarcelo@ac.upc.edu> <1329144150-7720-4-git-send-email-abarcelo@ac.upc.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1329144150-7720-4-git-send-email-abarcelo@ac.upc.edu> Subject: Re: [Qemu-devel] [PATCH 3/3] coroutine: adding enable/disable options for sigaltstack method Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Barcelo Cc: Kevin Wolf , qemu-devel@nongnu.org On Mon, Feb 13, 2012 at 03:42:30PM +0100, Alex Barcelo wrote: > It's possible to enable/disable sigaltstack, but it always has > less priority than ucontext method (to force sigaltstack, > ucontext has to be disabled). > > Signed-off-by: Alex Barcelo > --- > Makefile.objs | 4 ++++ > configure | 39 +++++++++++++++++++++++++++++++++++++++ > 2 files changed, 43 insertions(+), 0 deletions(-) > > diff --git a/Makefile.objs b/Makefile.objs > index 391e524..8874825 100644 > --- a/Makefile.objs > +++ b/Makefile.objs > @@ -17,8 +17,12 @@ coroutine-obj-y += qemu-coroutine-sleep.o > ifeq ($(CONFIG_UCONTEXT_COROUTINE),y) > coroutine-obj-$(CONFIG_POSIX) += coroutine-ucontext.o > else > +ifeq ($(CONFIG_SIGALTSTACK_COROUTINE),y) > +coroutine-obj-$(CONFIG_POSIX) += coroutine-sigaltstack.o > +else > coroutine-obj-$(CONFIG_POSIX) += coroutine-gthread.o > endif > +endif > coroutine-obj-$(CONFIG_WIN32) += coroutine-win32.o > > ####################################################################### > diff --git a/configure b/configure > index ed40da8..e9c27f3 100755 > --- a/configure > +++ b/configure > @@ -191,6 +191,7 @@ zlib="yes" > guest_agent="yes" > libiscsi="" > ucontext="" > +sigaltstack="" > > # parse CC options first > for opt do > @@ -803,6 +804,10 @@ for opt do > ;; > --disable-ucontext) ucontext="no" > ;; > + --enable-sigaltstack) sigaltstack="yes" > + ;; > + --disable-sigaltstack) sigaltstack="no" > + ;; > *) echo "ERROR: unknown option $opt"; show_help="yes" > ;; > esac > @@ -1091,6 +1096,8 @@ echo " --disable-guest-agent disable building of the QEMU Guest Agent" > echo " --enable-guest-agent enable building of the QEMU Guest Agent" > echo " --disable-ucontext disable ucontext functions for coroutines" > echo " --enable-ucontext enable ucontext functions for coroutines" > +echo " --disable-sigaltstack disable sigaltstack functions for coroutines" > +echo " --enable-sigaltstack enable sigaltstack functions for coroutines" Since the 3 different coroutine impls are mutually exclusive choices, perhaps it'd be preferable to just have a single configure argument like --with-couroutines=[ucontext|sigaltstack|gthread] Thus avoiding the non-sensical scenario of the user specifying --enable-ucontext --enable-sigaltstack Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|