From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOz3D-0007zo-Hj for qemu-devel@nongnu.org; Tue, 24 May 2011 17:22:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOz3C-0008B5-B0 for qemu-devel@nongnu.org; Tue, 24 May 2011 17:22:03 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:61355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOz3C-0008B0-8l for qemu-devel@nongnu.org; Tue, 24 May 2011 17:22:02 -0400 Received: by gxk26 with SMTP id 26so3334826gxk.4 for ; Tue, 24 May 2011 14:22:01 -0700 (PDT) Message-ID: <4DDC2175.3020107@codemonkey.ws> Date: Tue, 24 May 2011 16:21:57 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1305108925-26048-1-git-send-email-stefanha@linux.vnet.ibm.com> <1305108925-26048-2-git-send-email-stefanha@linux.vnet.ibm.com> <4DCA7B64.7000900@redhat.com> <4DCA8655.3070807@codemonkey.ws> <4DCA86A1.2020306@redhat.com> <4DCA89A9.8070000@us.ibm.com> <4DCA9303.5040400@redhat.com> <20110511135154.GU2661@redhat.com> <20110524193750.GQ969@shareable.org> <20110524195812.GA13211@stefanha-thinkpad.localdomain> In-Reply-To: <20110524195812.GA13211@stefanha-thinkpad.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Anthony Liguori , qemu-devel@nongnu.org, Paolo Bonzini , Venkateswararao Jujjuri On 05/24/2011 02:58 PM, Stefan Hajnoczi wrote: > On Tue, May 24, 2011 at 08:37:50PM +0100, Jamie Lokier wrote: > Thanks, I read about that but didn't try to implement special cases > because I don't have relevant OSes here to test against. > > My current plan is to try using sigaltstack(2) instead of > makecontext()/swapcontext() as a hack since OpenBSD doesn't have > makecontext()/swapcontext(). > > TBH I'm almost at the stage where I think we should just use threads > and/or async callbacks, as appropriate. Hopefully I'll be able to cook > up a reasonably portable implementation of coroutines though, because > the prospect of having to go fully threaded or do async callbacks isn't > attractive in many cases. Why not use threads as a coroutine callback? That's essentially what we would do to be "fully threaded". Regards, Anthony Liguori > > Stefan >