[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC][PATCH 04/12] coroutine: Use thread-local leader and c
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [RFC][PATCH 04/12] coroutine: Use thread-local leader and current variables |
Date: |
Sat, 22 Jan 2011 09:29:19 +0000 |
Each pthread should have its own current coroutine. This ensures
coroutines are thread-safe.
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
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
- [Qemu-devel] [RFC][PATCH 00/12] qcow2: Convert qcow2 to use coroutines for async I/O, Stefan Hajnoczi, 2011/01/22
- [Qemu-devel] [RFC][PATCH 07/12] coroutine: Add coroutine_is_leader(), Stefan Hajnoczi, 2011/01/22
- [Qemu-devel] [RFC][PATCH 08/12] coroutine: Add qemu_in_coroutine(), Stefan Hajnoczi, 2011/01/22
- [Qemu-devel] [RFC][PATCH 04/12] coroutine: Use thread-local leader and current variables,
Stefan Hajnoczi <=
- [Qemu-devel] [RFC][PATCH 09/12] block: Add bdrv_co_readv() and bdrv_co_writev(), Stefan Hajnoczi, 2011/01/22
- [Qemu-devel] [RFC][PATCH 10/12] block: Add coroutine support to synchronous I/O functions, Stefan Hajnoczi, 2011/01/22
- [Qemu-devel] [RFC][PATCH 06/12] coroutine: Add qemu_coroutine_self(), Stefan Hajnoczi, 2011/01/22
- [Qemu-devel] [RFC][PATCH 12/12] qcow2: Serialize all requests, Stefan Hajnoczi, 2011/01/22
- [Qemu-devel] [RFC][PATCH 05/12] coroutine: Add coroutines, Stefan Hajnoczi, 2011/01/22
- [Qemu-devel] [RFC][PATCH 11/12] qcow2: Convert qcow2 to use coroutines for async I/O, Stefan Hajnoczi, 2011/01/22