diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/qemu-coroutine-io.c | 2 | ||||
-rw-r--r-- | util/qemu-coroutine-lock.c | 4 | ||||
-rw-r--r-- | util/qemu-coroutine-sleep.c | 2 | ||||
-rw-r--r-- | util/qemu-coroutine.c | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/util/qemu-coroutine-io.c b/util/qemu-coroutine-io.c index 91b9357..44a8969 100644 --- a/util/qemu-coroutine-io.c +++ b/util/qemu-coroutine-io.c @@ -75,7 +75,7 @@ static void fd_coroutine_enter(void *opaque) { FDYieldUntilData *data = opaque; qemu_set_fd_handler(data->fd, NULL, NULL, NULL); - qemu_coroutine_enter(data->co, NULL); + qemu_coroutine_enter(data->co); } void coroutine_fn yield_until_fd_readable(int fd) diff --git a/util/qemu-coroutine-lock.c b/util/qemu-coroutine-lock.c index cf53693..22aa9ab 100644 --- a/util/qemu-coroutine-lock.c +++ b/util/qemu-coroutine-lock.c @@ -57,7 +57,7 @@ void qemu_co_queue_run_restart(Coroutine *co) trace_qemu_co_queue_run_restart(co); while ((next = QSIMPLEQ_FIRST(&co->co_queue_wakeup))) { QSIMPLEQ_REMOVE_HEAD(&co->co_queue_wakeup, co_queue_next); - qemu_coroutine_enter(next, NULL); + qemu_coroutine_enter(next); } } @@ -103,7 +103,7 @@ bool qemu_co_enter_next(CoQueue *queue) } QSIMPLEQ_REMOVE_HEAD(&queue->entries, co_queue_next); - qemu_coroutine_enter(next, NULL); + qemu_coroutine_enter(next); return true; } diff --git a/util/qemu-coroutine-sleep.c b/util/qemu-coroutine-sleep.c index 6966831..25de3ed 100644 --- a/util/qemu-coroutine-sleep.c +++ b/util/qemu-coroutine-sleep.c @@ -25,7 +25,7 @@ static void co_sleep_cb(void *opaque) { CoSleepCB *sleep_cb = opaque; - qemu_coroutine_enter(sleep_cb->co, NULL); + qemu_coroutine_enter(sleep_cb->co); } void coroutine_fn co_aio_sleep_ns(AioContext *ctx, QEMUClockType type, diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c index b7cb636..89f21a9 100644 --- a/util/qemu-coroutine.c +++ b/util/qemu-coroutine.c @@ -42,7 +42,7 @@ static void coroutine_pool_cleanup(Notifier *n, void *value) } } -Coroutine *qemu_coroutine_create(CoroutineEntry *entry) +Coroutine *qemu_coroutine_create(CoroutineEntry *entry, void *opaque) { Coroutine *co = NULL; @@ -76,6 +76,7 @@ Coroutine *qemu_coroutine_create(CoroutineEntry *entry) } co->entry = entry; + co->entry_arg = opaque; QSIMPLEQ_INIT(&co->co_queue_wakeup); return co; } @@ -100,12 +101,12 @@ static void coroutine_delete(Coroutine *co) qemu_coroutine_delete(co); } -void qemu_coroutine_enter(Coroutine *co, void *opaque) +void qemu_coroutine_enter(Coroutine *co) { Coroutine *self = qemu_coroutine_self(); CoroutineAction ret; - trace_qemu_coroutine_enter(self, co, opaque); + trace_qemu_coroutine_enter(self, co, co->entry_arg); if (co->caller) { fprintf(stderr, "Co-routine re-entered recursively\n"); @@ -113,7 +114,6 @@ void qemu_coroutine_enter(Coroutine *co, void *opaque) } co->caller = self; - co->entry_arg = opaque; ret = qemu_coroutine_switch(self, co, COROUTINE_ENTER); qemu_co_queue_run_restart(co); |