[Spice-devel] [PATCH spice-gtk 1/5] coroutine: fix current coroutine

Hans de Goede hdegoede at redhat.com
Sat Jun 8 07:32:12 PDT 2013


Hi,

Looks good, ack.

Regards,

Hans


On 06/05/2013 05:39 PM, Marc-André Lureau wrote:
> When leaving a coroutine, it swaps back to where it came from, not to
> the leader/main coroutine.
> ---
>   gtk/coroutine_ucontext.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gtk/coroutine_ucontext.c b/gtk/coroutine_ucontext.c
> index af811a7..6d2f74a 100644
> --- a/gtk/coroutine_ucontext.c
> +++ b/gtk/coroutine_ucontext.c
> @@ -102,7 +102,7 @@ void *coroutine_swap(struct coroutine *from, struct coroutine *to, void *arg)
>   		return from->data;
>   	else if (ret == 1) {
>   		coroutine_release(to);
> -		current = &leader;
> +		current = from;
>   		to->exited = 1;
>   		return to->data;
>   	}
>


More information about the Spice-devel mailing list