aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/qemu/coroutine.h8
-rw-r--r--include/qemu/main-loop.h4
2 files changed, 5 insertions, 7 deletions
diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h
index 63ae7fe..ac8d4c9 100644
--- a/include/qemu/coroutine.h
+++ b/include/qemu/coroutine.h
@@ -61,16 +61,14 @@ typedef void coroutine_fn CoroutineEntry(void *opaque);
* Create a new coroutine
*
* Use qemu_coroutine_enter() to actually transfer control to the coroutine.
+ * The opaque argument is passed as the argument to the entry point.
*/
-Coroutine *qemu_coroutine_create(CoroutineEntry *entry);
+Coroutine *qemu_coroutine_create(CoroutineEntry *entry, void *opaque);
/**
* Transfer control to a coroutine
- *
- * The opaque argument is passed as the argument to the entry point when
- * entering the coroutine for the first time. It is subsequently ignored.
*/
-void qemu_coroutine_enter(Coroutine *coroutine, void *opaque);
+void qemu_coroutine_enter(Coroutine *coroutine);
/**
* Transfer control back to a coroutine's caller
diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h
index 3fa7cfe..470f600 100644
--- a/include/qemu/main-loop.h
+++ b/include/qemu/main-loop.h
@@ -64,11 +64,11 @@ int qemu_init_main_loop(Error **errp);
*
* void enter_co_bh(void *opaque) {
* QEMUCoroutine *co = opaque;
- * qemu_coroutine_enter(co, NULL);
+ * qemu_coroutine_enter(co);
* }
*
* ...
- * QEMUCoroutine *co = qemu_coroutine_create(coroutine_entry);
+ * QEMUCoroutine *co = qemu_coroutine_create(coroutine_entry, NULL);
* QEMUBH *start_bh = qemu_bh_new(enter_co_bh, co);
* qemu_bh_schedule(start_bh);
* while (...) {