From patchwork Tue Feb 28 11:25:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Barcelo X-Patchwork-Id: 143417 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AC2DCB6FA3 for ; Tue, 28 Feb 2012 22:26:59 +1100 (EST) Received: from localhost ([::1]:50695 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2LCr-0002VO-73 for incoming@patchwork.ozlabs.org; Tue, 28 Feb 2012 06:26:57 -0500 Received: from eggs.gnu.org ([208.118.235.92]:36040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2LCT-00029u-Eh for qemu-devel@nongnu.org; Tue, 28 Feb 2012 06:26:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2LCM-0007Vk-Rs for qemu-devel@nongnu.org; Tue, 28 Feb 2012 06:26:32 -0500 Received: from mail-we0-f173.google.com ([74.125.82.173]:43128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2LCM-0007UN-JM for qemu-devel@nongnu.org; Tue, 28 Feb 2012 06:26:26 -0500 Received: by mail-we0-f173.google.com with SMTP id p12so1870298wer.4 for ; Tue, 28 Feb 2012 03:26:25 -0800 (PST) Received-SPF: pass (google.com: domain of alex.barcelo@gmail.com designates 10.216.136.152 as permitted sender) client-ip=10.216.136.152; Authentication-Results: mr.google.com; spf=pass (google.com: domain of alex.barcelo@gmail.com designates 10.216.136.152 as permitted sender) smtp.mail=alex.barcelo@gmail.com; dkim=pass header.i=alex.barcelo@gmail.com Received: from mr.google.com ([10.216.136.152]) by 10.216.136.152 with SMTP id w24mr9424605wei.50.1330428385745 (num_hops = 1); Tue, 28 Feb 2012 03:26:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=s7oMWpLys8juhk1H8vx35BkDbl7kuDzaIsPhv5iDHUQ=; b=nxpvu9LzQj2efRNkgQHzzUHCuAxSU66icn8xWdK84eEELXwdCBDuiSlaPcNh4SOFH9 PAtsrbUmlOEGE5k9GRz5OmGrdgSTESDbD7yDp9LbnRzgpD1Sjih911V3HfhYsj4NBl3a vkOagTlwLzrKyYmATtgE7oiXe2VMVgMU4mXzM= Received: by 10.216.136.152 with SMTP id w24mr7488796wei.50.1330428385700; Tue, 28 Feb 2012 03:26:25 -0800 (PST) Received: from localhost.localdomain (62.57.1.36.dyn.user.ono.com. [62.57.1.36]) by mx.google.com with ESMTPS id s2sm69580022wix.3.2012.02.28.03.26.23 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 28 Feb 2012 03:26:24 -0800 (PST) From: Alex Barcelo To: qemu-devel@nongnu.org, Kevin Wolf Date: Tue, 28 Feb 2012 12:25:51 +0100 Message-Id: <1330428351-6605-4-git-send-email-abarcelo@ac.upc.edu> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1330428351-6605-1-git-send-email-abarcelo@ac.upc.edu> References: <1330428351-6605-1-git-send-email-abarcelo@ac.upc.edu> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.173 Cc: Alex Barcelo Subject: [Qemu-devel] [PATCH v2 3/3] coroutine: adding configure option for sigaltstack coroutine backend X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org It's possible to use sigaltstack backend with --with-coroutine=sigaltstack v2: changed from enable/disable configure flags Signed-off-by: Alex Barcelo --- Makefile.objs | 4 ++++ configure | 6 +++++- 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index 808de6a..9dcd226 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 5a12c56..b473936 100755 --- a/configure +++ b/configure @@ -1099,7 +1099,7 @@ echo " --enable-usb-redir enable usb network redirection support" echo " --disable-guest-agent disable building of the QEMU Guest Agent" echo " --enable-guest-agent enable building of the QEMU Guest Agent" echo " --with-coroutine=BACKEND coroutine backend. Supported options:" -echo " gthread, ucontext, windows" +echo " gthread, ucontext, sigaltstack, windows" echo "" echo "NOTE: The object files are built at the place where configure is launched" exit 1 @@ -2752,6 +2752,8 @@ elif test "$coroutine" = "gthread" ; then coroutine_backend=gthread elif test "$coroutine" = "windows" ; then coroutine_backend=windows +elif test "$coroutine" = "sigaltstack" ; then + coroutine_backend=sigaltstack else echo echo "Error: unknown coroutine backend $coroutine" @@ -3274,6 +3276,8 @@ fi if test "$coroutine_backend" = "ucontext" ; then echo "CONFIG_UCONTEXT_COROUTINE=y" >> $config_host_mak +elif test "$coroutine_backend" = "sigaltstack" ; then + echo "CONFIG_SIGALTSTACK_COROUTINE=y" >> $config_host_mak fi if test "$open_by_handle_at" = "yes" ; then