diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-11-09 11:20:51 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-11-09 11:20:51 +0000 |
commit | 9d5c1dc117d1ad881bbc76f6990ee1f9e9f8ef7f (patch) | |
tree | 90d4dace696dbff6d0414de85353fdc6b6d39bc6 /include | |
parent | b3a9e57d92dff7dd5822f322e4eb49af9e1b70b8 (diff) | |
parent | 84aa0140dd4f04f5d993f0db14c40da8d3de2706 (diff) | |
download | qemu-9d5c1dc117d1ad881bbc76f6990ee1f9e9f8ef7f.zip qemu-9d5c1dc117d1ad881bbc76f6990ee1f9e9f8ef7f.tar.gz qemu-9d5c1dc117d1ad881bbc76f6990ee1f9e9f8ef7f.tar.bz2 |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
# gpg: Signature made Mon 09 Nov 2015 10:08:17 GMT using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
* remotes/stefanha/tags/block-pull-request:
blockdev: acquire AioContext in hmp_commit()
monitor: add missed aio_context_acquire into vm_completion call
aio: Introduce aio-epoll.c
aio: Introduce aio_context_setup
aio: Introduce aio_external_disabled
dataplane: support non-contigious s/g
dataplane: simplify indirect descriptor read
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/aio.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/block/aio.h b/include/block/aio.h index 92efc5e..e086e3b 100644 --- a/include/block/aio.h +++ b/include/block/aio.h @@ -124,6 +124,11 @@ struct AioContext { QEMUTimerListGroup tlg; int external_disable_cnt; + + /* epoll(7) state used when built with CONFIG_EPOLL */ + int epollfd; + bool epoll_enabled; + bool epoll_available; }; /** @@ -406,6 +411,17 @@ static inline void aio_enable_external(AioContext *ctx) } /** + * 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: * @ctx: the aio context * @is_external: Whether or not the checked node is an external event source. @@ -418,4 +434,12 @@ static inline bool aio_node_check(AioContext *ctx, bool is_external) return !is_external || !atomic_read(&ctx->external_disable_cnt); } +/** + * aio_context_setup: + * @ctx: the aio context + * + * Initialize the aio context. + */ +void aio_context_setup(AioContext *ctx, Error **errp); + #endif |