qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 1/2] coroutine: introduce coroutines
Date: Tue, 24 May 2011 16:21:57 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]