mirror of https://github.com/xqemu/xqemu.git
aio: Introduce aio_external_disabled
This allows AioContext users to check the enable/disable state of external clients. Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1446177989-6702-2-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
8347c53243
commit
5ceb9e3928
|
@ -405,6 +405,17 @@ static inline void aio_enable_external(AioContext *ctx)
|
||||||
atomic_dec(&ctx->external_disable_cnt);
|
atomic_dec(&ctx->external_disable_cnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* aio_external_disabled:
|
||||||
|
* @ctx: the aio context
|
||||||
|
*
|
||||||
|
* Return true if the external clients are disabled.
|
||||||
|
*/
|
||||||
|
static inline bool aio_external_disabled(AioContext *ctx)
|
||||||
|
{
|
||||||
|
return atomic_read(&ctx->external_disable_cnt);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* aio_node_check:
|
* aio_node_check:
|
||||||
* @ctx: the aio context
|
* @ctx: the aio context
|
||||||
|
|
Loading…
Reference in New Issue