summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStefan Hajnoczi2017-11-09 11:26:52 +0100
committerStefan Hajnoczi2017-12-19 10:25:27 +0100
commit78f1d3d6a6904459b0b6cfd735278e4e2b7b68c5 (patch)
treeea95b1b42bc1b9ccd6b4ae549fd478c812ffc6da /include
parentMerge remote-tracking branch 'remotes/mjt/tags/trivial-patches-fetch' into st... (diff)
downloadqemu-78f1d3d6a6904459b0b6cfd735278e4e2b7b68c5.tar.gz
qemu-78f1d3d6a6904459b0b6cfd735278e4e2b7b68c5.tar.xz
qemu-78f1d3d6a6904459b0b6cfd735278e4e2b7b68c5.zip
coroutine: simplify co_aio_sleep_ns() prototype
The AioContext pointer argument to co_aio_sleep_ns() is only used for the sleep timer. It does not affect where the caller coroutine is resumed. Due to changes to coroutine and AIO APIs it is now possible to drop the AioContext pointer argument. This is safe to do since no caller has specific requirements for which AioContext the timer must run in. This patch drops the AioContext pointer argument and renames the function to simplify the API. Reported-by: Paolo Bonzini <pbonzini@redhat.com> Reported-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20171109102652.6360-1-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/qemu/coroutine.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h
index 9aff9a735e..ce2eb73670 100644
--- a/include/qemu/coroutine.h
+++ b/include/qemu/coroutine.h
@@ -261,12 +261,8 @@ void qemu_co_rwlock_unlock(CoRwlock *lock);
/**
* Yield the coroutine for a given duration
- *
- * Behaves similarly to co_sleep_ns(), but the sleeping coroutine will be
- * resumed when using aio_poll().
*/
-void coroutine_fn co_aio_sleep_ns(AioContext *ctx, QEMUClockType type,
- int64_t ns);
+void coroutine_fn qemu_co_sleep_ns(QEMUClockType type, int64_t ns);
/**
* Yield until a file descriptor becomes readable