Re: [Qemu-devel] [RFC][PATCH 01/12] coroutine: Add gtk-vnc coroutines library

2011-01-26 Thread Avi Kivity
On 01/26/2011 06:19 PM, Anthony Liguori wrote: What do you mean by threaded version? Stefan didn't post it, but the original code also has a GThread based implementation when ucontext isn't available (like on Windows). It uses a mutex to control the execution of the coroutines. Ah ok. Th

Re: [Qemu-devel] [RFC][PATCH 01/12] coroutine: Add gtk-vnc coroutines library

2011-01-26 Thread Anthony Liguori
On 01/26/2011 10:22 AM, Avi Kivity wrote: On 01/26/2011 06:19 PM, Anthony Liguori wrote: What do you mean by threaded version? Stefan didn't post it, but the original code also has a GThread based implementation when ucontext isn't available (like on Windows). It uses a mutex to control th

Re: [Qemu-devel] [RFC][PATCH 01/12] coroutine: Add gtk-vnc coroutines library

2011-01-26 Thread Anthony Liguori
On 01/26/2011 10:13 AM, Avi Kivity wrote: On 01/26/2011 06:00 PM, Anthony Liguori wrote: On 01/26/2011 09:25 AM, Avi Kivity wrote: On 01/22/2011 11:29 AM, Stefan Hajnoczi wrote: Asynchronous image format code is becoming very complex. Let's try using coroutines to write sequential code withou

Re: [Qemu-devel] [RFC][PATCH 01/12] coroutine: Add gtk-vnc coroutines library

2011-01-26 Thread Anthony Liguori
On 01/26/2011 10:13 AM, Avi Kivity wrote: On 01/26/2011 06:00 PM, Anthony Liguori wrote: On 01/26/2011 09:25 AM, Avi Kivity wrote: On 01/22/2011 11:29 AM, Stefan Hajnoczi wrote: Asynchronous image format code is becoming very complex. Let's try using coroutines to write sequential code withou

Re: [Qemu-devel] [RFC][PATCH 01/12] coroutine: Add gtk-vnc coroutines library

2011-01-26 Thread Avi Kivity
On 01/26/2011 06:00 PM, Anthony Liguori wrote: On 01/26/2011 09:25 AM, Avi Kivity wrote: On 01/22/2011 11:29 AM, Stefan Hajnoczi wrote: Asynchronous image format code is becoming very complex. Let's try using coroutines to write sequential code without callbacks but use coroutines to switch st

Re: [Qemu-devel] [RFC][PATCH 01/12] coroutine: Add gtk-vnc coroutines library

2011-01-26 Thread Anthony Liguori
On 01/26/2011 09:25 AM, Avi Kivity wrote: On 01/22/2011 11:29 AM, Stefan Hajnoczi wrote: Asynchronous image format code is becoming very complex. Let's try using coroutines to write sequential code without callbacks but use coroutines to switch stacks under the hood. + +int cc_swap(struct con

Re: [Qemu-devel] [RFC][PATCH 01/12] coroutine: Add gtk-vnc coroutines library

2011-01-26 Thread Avi Kivity
On 01/22/2011 11:29 AM, Stefan Hajnoczi wrote: Asynchronous image format code is becoming very complex. Let's try using coroutines to write sequential code without callbacks but use coroutines to switch stacks under the hood. + +int cc_swap(struct continuation *from, struct continuation *to) +