diff options
author | Stefan Hajnoczi | 2018-02-16 17:50:11 +0100 |
---|---|---|
committer | Kevin Wolf | 2018-03-02 18:39:07 +0100 |
commit | d2b63ba8dd20c1091b3f1033e6a95ef95b18149d (patch) | |
tree | 8de7843b028a0c1072ee71e1703cd817936ac643 /include/block/aio.h | |
parent | docs: document how to use the l2-cache-entry-size parameter (diff) | |
download | qemu-d2b63ba8dd20c1091b3f1033e6a95ef95b18149d.tar.gz qemu-d2b63ba8dd20c1091b3f1033e6a95ef95b18149d.tar.xz qemu-d2b63ba8dd20c1091b3f1033e6a95ef95b18149d.zip |
aio: rename aio_context_in_iothread() to in_aio_context_home_thread()
The name aio_context_in_iothread() is misleading because it also returns
true when called on the main AioContext from the main loop thread, which
is not an IOThread.
This patch renames it to in_aio_context_home_thread() and expands the
doc comment to make the semantics clearer.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block/aio.h')
-rw-r--r-- | include/block/aio.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/block/aio.h b/include/block/aio.h index e9aeeaec94..a1d6b9e249 100644 --- a/include/block/aio.h +++ b/include/block/aio.h @@ -534,11 +534,14 @@ void aio_co_enter(AioContext *ctx, struct Coroutine *co); AioContext *qemu_get_current_aio_context(void); /** + * in_aio_context_home_thread: * @ctx: the aio context * - * Return whether we are running in the I/O thread that manages @ctx. + * Return whether we are running in the thread that normally runs @ctx. Note + * that acquiring/releasing ctx does not affect the outcome, each AioContext + * still only has one home thread that is responsible for running it. */ -static inline bool aio_context_in_iothread(AioContext *ctx) +static inline bool in_aio_context_home_thread(AioContext *ctx) { return ctx == qemu_get_current_aio_context(); } |