Each pthread should have its own current coroutine. This ensures coroutines are thread-safe.
Signed-off-by: Stefan Hajnoczi <stefa...@linux.vnet.ibm.com> --- coroutine_ucontext.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/coroutine_ucontext.c b/coroutine_ucontext.c index f76da94..289e5bd 100644 --- a/coroutine_ucontext.c +++ b/coroutine_ucontext.c @@ -70,13 +70,8 @@ int coroutine_init(struct coroutine *co) return cc_init(&co->cc); } -#if 0 static __thread struct coroutine leader; static __thread struct coroutine *current; -#else -static struct coroutine leader; -static struct coroutine *current; -#endif struct coroutine *coroutine_self(void) { -- 1.7.2.3