Message ID | 1295688567-25496-5-git-send-email-stefanha@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
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) {
Each pthread should have its own current coroutine. This ensures coroutines are thread-safe. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> --- coroutine_ucontext.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)