coroutine: Use Coroutine typedef name instead of structure tag
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20221221131435.3851212-6-armbru@redhat.com>
This commit is contained in:
parent
68ba85cecc
commit
4369560135
@ -52,7 +52,6 @@ typedef void QEMUBHFunc(void *opaque);
|
|||||||
typedef bool AioPollFn(void *opaque);
|
typedef bool AioPollFn(void *opaque);
|
||||||
typedef void IOHandler(void *opaque);
|
typedef void IOHandler(void *opaque);
|
||||||
|
|
||||||
struct Coroutine;
|
|
||||||
struct ThreadPool;
|
struct ThreadPool;
|
||||||
struct LinuxAioState;
|
struct LinuxAioState;
|
||||||
struct LuringState;
|
struct LuringState;
|
||||||
@ -694,7 +693,7 @@ static inline bool aio_node_check(AioContext *ctx, bool is_external)
|
|||||||
* is the context in which the coroutine is running (i.e. the value of
|
* is the context in which the coroutine is running (i.e. the value of
|
||||||
* qemu_get_current_aio_context() from the coroutine itself).
|
* qemu_get_current_aio_context() from the coroutine itself).
|
||||||
*/
|
*/
|
||||||
void aio_co_schedule(AioContext *ctx, struct Coroutine *co);
|
void aio_co_schedule(AioContext *ctx, Coroutine *co);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* aio_co_reschedule_self:
|
* aio_co_reschedule_self:
|
||||||
@ -717,7 +716,7 @@ void coroutine_fn aio_co_reschedule_self(AioContext *new_ctx);
|
|||||||
* context. The coroutine must not be entered by anyone else while
|
* context. The coroutine must not be entered by anyone else while
|
||||||
* aio_co_wake() is active.
|
* aio_co_wake() is active.
|
||||||
*/
|
*/
|
||||||
void aio_co_wake(struct Coroutine *co);
|
void aio_co_wake(Coroutine *co);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* aio_co_enter:
|
* aio_co_enter:
|
||||||
@ -726,7 +725,7 @@ void aio_co_wake(struct Coroutine *co);
|
|||||||
*
|
*
|
||||||
* Enter a coroutine in the specified AioContext.
|
* Enter a coroutine in the specified AioContext.
|
||||||
*/
|
*/
|
||||||
void aio_co_enter(AioContext *ctx, struct Coroutine *co);
|
void aio_co_enter(AioContext *ctx, Coroutine *co);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the AioContext whose event loop runs in the current thread.
|
* Return the AioContext whose event loop runs in the current thread.
|
||||||
|
@ -640,7 +640,7 @@ void coroutine_fn aio_co_reschedule_self(AioContext *new_ctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void aio_co_wake(struct Coroutine *co)
|
void aio_co_wake(Coroutine *co)
|
||||||
{
|
{
|
||||||
AioContext *ctx;
|
AioContext *ctx;
|
||||||
|
|
||||||
@ -653,7 +653,7 @@ void aio_co_wake(struct Coroutine *co)
|
|||||||
aio_co_enter(ctx, co);
|
aio_co_enter(ctx, co);
|
||||||
}
|
}
|
||||||
|
|
||||||
void aio_co_enter(AioContext *ctx, struct Coroutine *co)
|
void aio_co_enter(AioContext *ctx, Coroutine *co)
|
||||||
{
|
{
|
||||||
if (ctx != qemu_get_current_aio_context()) {
|
if (ctx != qemu_get_current_aio_context()) {
|
||||||
aio_co_schedule(ctx, co);
|
aio_co_schedule(ctx, co);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user