qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

coroutine-sigaltstack: rename coroutine struct appropriately

The name of the sigaltstack coroutine struct was misleading.

Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

authored by

Peter Lieven and committed by
Kevin Wolf
be87a393 8737d9e0

+8 -8
+8 -8
util/coroutine-sigaltstack.c
··· 34 34 Coroutine base; 35 35 void *stack; 36 36 sigjmp_buf env; 37 - } CoroutineUContext; 37 + } CoroutineSigAltStack; 38 38 39 39 /** 40 40 * Per-thread coroutine bookkeeping ··· 44 44 Coroutine *current; 45 45 46 46 /** The default coroutine */ 47 - CoroutineUContext leader; 47 + CoroutineSigAltStack leader; 48 48 49 49 /** Information for the signal handler (trampoline) */ 50 50 sigjmp_buf tr_reenter; ··· 89 89 * (from the signal handler when it is not signal handling, read ahead 90 90 * for more information). 91 91 */ 92 - static void coroutine_bootstrap(CoroutineUContext *self, Coroutine *co) 92 + static void coroutine_bootstrap(CoroutineSigAltStack *self, Coroutine *co) 93 93 { 94 94 /* Initialize longjmp environment and switch back the caller */ 95 95 if (!sigsetjmp(self->env, 0)) { ··· 109 109 */ 110 110 static void coroutine_trampoline(int signal) 111 111 { 112 - CoroutineUContext *self; 112 + CoroutineSigAltStack *self; 113 113 Coroutine *co; 114 114 CoroutineThreadState *coTS; 115 115 ··· 144 144 Coroutine *qemu_coroutine_new(void) 145 145 { 146 146 const size_t stack_size = 1 << 20; 147 - CoroutineUContext *co; 147 + CoroutineSigAltStack *co; 148 148 CoroutineThreadState *coTS; 149 149 struct sigaction sa; 150 150 struct sigaction osa; ··· 251 251 252 252 void qemu_coroutine_delete(Coroutine *co_) 253 253 { 254 - CoroutineUContext *co = DO_UPCAST(CoroutineUContext, base, co_); 254 + CoroutineSigAltStack *co = DO_UPCAST(CoroutineSigAltStack, base, co_); 255 255 256 256 g_free(co->stack); 257 257 g_free(co); ··· 260 260 CoroutineAction qemu_coroutine_switch(Coroutine *from_, Coroutine *to_, 261 261 CoroutineAction action) 262 262 { 263 - CoroutineUContext *from = DO_UPCAST(CoroutineUContext, base, from_); 264 - CoroutineUContext *to = DO_UPCAST(CoroutineUContext, base, to_); 263 + CoroutineSigAltStack *from = DO_UPCAST(CoroutineSigAltStack, base, from_); 264 + CoroutineSigAltStack *to = DO_UPCAST(CoroutineSigAltStack, base, to_); 265 265 CoroutineThreadState *s = coroutine_get_thread_state(); 266 266 int ret; 267 267