qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/7] coroutine-ucontext: use __thread


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 1/7] coroutine-ucontext: use __thread
Date: Fri, 28 Nov 2014 14:28:53 +0000

On 28 November 2014 at 14:12, Paolo Bonzini <address@hidden> 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



reply via email to

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