[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 38/42] coroutine: add a macro for the coroutine stack
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 38/42] coroutine: add a macro for the coroutine stack size |
Date: |
Mon, 5 Sep 2016 20:13:50 +0200 |
From: Peter Lieven <address@hidden>
Signed-off-by: Peter Lieven <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
include/qemu/coroutine_int.h | 2 ++
util/coroutine-sigaltstack.c | 2 +-
util/coroutine-ucontext.c | 2 +-
util/coroutine-win32.c | 2 +-
4 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/qemu/coroutine_int.h b/include/qemu/coroutine_int.h
index 6df9d33..14d4f1d 100644
--- a/include/qemu/coroutine_int.h
+++ b/include/qemu/coroutine_int.h
@@ -28,6 +28,8 @@
#include "qemu/queue.h"
#include "qemu/coroutine.h"
+#define COROUTINE_STACK_SIZE (1 << 20)
+
typedef enum {
COROUTINE_YIELD = 1,
COROUTINE_TERMINATE = 2,
diff --git a/util/coroutine-sigaltstack.c b/util/coroutine-sigaltstack.c
index a7c3366..9c2854c 100644
--- a/util/coroutine-sigaltstack.c
+++ b/util/coroutine-sigaltstack.c
@@ -143,7 +143,7 @@ static void coroutine_trampoline(int signal)
Coroutine *qemu_coroutine_new(void)
{
- const size_t stack_size = 1 << 20;
+ const size_t stack_size = COROUTINE_STACK_SIZE;
CoroutineUContext *co;
CoroutineThreadState *coTS;
struct sigaction sa;
diff --git a/util/coroutine-ucontext.c b/util/coroutine-ucontext.c
index 2bb7e10..31254ab 100644
--- a/util/coroutine-ucontext.c
+++ b/util/coroutine-ucontext.c
@@ -82,7 +82,7 @@ static void coroutine_trampoline(int i0, int i1)
Coroutine *qemu_coroutine_new(void)
{
- const size_t stack_size = 1 << 20;
+ const size_t stack_size = COROUTINE_STACK_SIZE;
CoroutineUContext *co;
ucontext_t old_uc, uc;
sigjmp_buf old_env;
diff --git a/util/coroutine-win32.c b/util/coroutine-win32.c
index 02e28e8..de6bd4f 100644
--- a/util/coroutine-win32.c
+++ b/util/coroutine-win32.c
@@ -71,7 +71,7 @@ static void CALLBACK coroutine_trampoline(void *co_)
Coroutine *qemu_coroutine_new(void)
{
- const size_t stack_size = 1 << 20;
+ const size_t stack_size = COROUTINE_STACK_SIZE;
CoroutineWin32 *co;
co = g_malloc0(sizeof(*co));
--
1.8.3.1
- [Qemu-devel] [PULL 29/42] qemu-iotests: add vmdk for test backup compression in 055, (continued)
- [Qemu-devel] [PULL 29/42] qemu-iotests: add vmdk for test backup compression in 055, Kevin Wolf, 2016/09/05
- [Qemu-devel] [PULL 31/42] qcow2: fix iovec size at qcow2_co_pwritev_compressed, Kevin Wolf, 2016/09/05
- [Qemu-devel] [PULL 34/42] block jobs: Improve error message for missing job ID, Kevin Wolf, 2016/09/05
- [Qemu-devel] [PULL 35/42] qemu-iotests: Log QMP traffic in debug mode, Kevin Wolf, 2016/09/05
- [Qemu-devel] [PULL 33/42] coroutine: Assert that no locks are held on termination, Kevin Wolf, 2016/09/05
- [Qemu-devel] [PULL 36/42] block: Allow node name for 'qemu-io' HMP command, Kevin Wolf, 2016/09/05
- [Qemu-devel] [PULL 30/42] test-coroutine: Fix coroutine pool corruption, Kevin Wolf, 2016/09/05
- [Qemu-devel] [PULL 37/42] oslib-posix: add helpers for stack alloc and free, Kevin Wolf, 2016/09/05
- [Qemu-devel] [PULL 39/42] coroutine-ucontext: use helper for allocating stack memory, Kevin Wolf, 2016/09/05
- [Qemu-devel] [PULL 38/42] coroutine: add a macro for the coroutine stack size,
Kevin Wolf <=
- [Qemu-devel] [PULL 40/42] coroutine-sigaltstack: use helper for allocating stack memory, Kevin Wolf, 2016/09/05
- [Qemu-devel] [PULL 41/42] oslib-posix: add a configure switch to debug stack usage, Kevin Wolf, 2016/09/05
- [Qemu-devel] [PULL 42/42] coroutine: reduce stack size to 64kB, Kevin Wolf, 2016/09/05
- Re: [Qemu-devel] [PULL 00/42] Block layer patches, Peter Maydell, 2016/09/06
- Re: [Qemu-devel] [PULL 00/42] Block layer patches, Peter Maydell, 2016/09/06
- Re: [Qemu-devel] [PULL 00/42] Block layer patches, Peter Maydell, 2016/09/06