On 28 November 2014 at 14:12, Paolo Bonzini <pbonz...@redhat.com> wrote: > +/* This function is marked noinline to prevent GCC from inlining it > + * into coroutine_trampoline(). If we allow it to do that then it > + * hoists the code to get the address of the TLS variable "current" > + * out of the while() loop. This is an invalid transformation because > + * the SwitchToFiber() call may be called when running thread A but > + * return in thread B, and so we might be in a different thread > + * context each time round the loop. > + */ > CoroutineAction qemu_coroutine_switch(Coroutine *from_, Coroutine *to_, > CoroutineAction action)
??? You've added the comment but the function is not marked "noinline" at all... -- PMM