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

2011-05-13 Thread Kevin Wolf
Am 12.05.2011 21:22, schrieb Stefan Hajnoczi: > On Thu, May 12, 2011 at 7:12 PM, Blue Swirl wrote: >> On Thu, May 12, 2011 at 12:54 PM, Stefan Hajnoczi >> wrote: >>> diff --git a/coroutine-ucontext.c b/coroutine-ucontext.c >>> new file mode 100644 >>> index 000..3b14ebf >>> --- /dev/null >>>

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

2011-05-12 Thread Stefan Hajnoczi
On Thu, May 12, 2011 at 7:12 PM, Blue Swirl wrote: > On Thu, May 12, 2011 at 12:54 PM, Stefan Hajnoczi > wrote: >> diff --git a/coroutine-ucontext.c b/coroutine-ucontext.c >> new file mode 100644 >> index 000..3b14ebf >> --- /dev/null >> +++ b/coroutine-ucontext.c >> @@ -0,0 +1,73 @@ >> +/* >

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

2011-05-12 Thread Blue Swirl
On Thu, May 12, 2011 at 12:54 PM, Stefan Hajnoczi wrote: > From: Kevin Wolf > > Asynchronous code is becoming very complex.  At the same time > synchronous code is growing because it is convenient to write. > Sometimes duplicate code paths are even added, one synchronous and the > other asynchron

[Qemu-devel] [PATCH v2 1/4] coroutine: introduce coroutines

2011-05-12 Thread Stefan Hajnoczi
From: Kevin Wolf Asynchronous code is becoming very complex. At the same time synchronous code is growing because it is convenient to write. Sometimes duplicate code paths are even added, one synchronous and the other asynchronous. This patch introduces coroutines which allow code that looks sy