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: Wed, 11 May 2011 07:51:33 -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/11/2011 07:04 AM, Paolo Bonzini wrote:
On 05/11/2011 12:15 PM, Stefan Hajnoczi wrote:
+#ifdef __i386__
+ asm volatile(
+ "mov %%esp, %%ebx;"
+ "mov %0, %%esp;"
+ "pushl %1;"
+ "call _trampoline;"
+ "mov %%ebx, %%esp;"
+ : : "r" (co->stack + co->stack_size), "r" (co) : "ebx"
+ );

This is incomplete, it should set FS:[4] and FS:[8] to top and bottom of
stack respectively, otherwise exception handling (including SIGSEGV) is
broken. But I think for Windows it's anyway better to use fibers. Commit
this and either I or Stefan Weil will fix it. :)

Acked-by: Paolo Bonzini <address@hidden>

How about a generic thread fallback? That's what we do in gtk-vnc and it solves the portability issue in a very robust way.

Regards,

Anthony Liguori


Paolo





reply via email to

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