[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v15 15/21] bottom halves: introduce bh call function
From: |
Pavel Dovgalyuk |
Subject: |
[Qemu-devel] [PATCH v15 15/21] bottom halves: introduce bh call function |
Date: |
Wed, 01 Jul 2015 14:53:00 +0300 |
User-agent: |
StGit/0.16 |
This patch introduces aio_bh_call function. It is used to execute
bottom halves as callbacks without adding them to the queue.
Signed-off-by: Pavel Dovgalyuk <address@hidden>
---
async.c | 7 ++++++-
include/block/aio.h | 5 +++++
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/async.c b/async.c
index 77d080d..7584b7e 100644
--- a/async.c
+++ b/async.c
@@ -59,6 +59,11 @@ QEMUBH *aio_bh_new(AioContext *ctx, QEMUBHFunc *cb, void
*opaque)
return bh;
}
+void aio_bh_call(QEMUBH *bh)
+{
+ bh->cb(bh->opaque);
+}
+
/* Multiple occurrences of aio_bh_poll cannot be called concurrently */
int aio_bh_poll(AioContext *ctx)
{
@@ -82,7 +87,7 @@ int aio_bh_poll(AioContext *ctx)
if (!bh->idle)
ret = 1;
bh->idle = 0;
- bh->cb(bh->opaque);
+ aio_bh_call(bh);
}
}
diff --git a/include/block/aio.h b/include/block/aio.h
index b46103e..0ec711f 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -157,6 +157,11 @@ QEMUBH *aio_bh_new(AioContext *ctx, QEMUBHFunc *cb, void
*opaque);
void aio_notify(AioContext *ctx);
/**
+ * aio_bh_call: Executes callback function of the specified BH.
+ */
+void aio_bh_call(QEMUBH *bh);
+
+/**
* aio_bh_poll: Poll bottom halves for an AioContext.
*
* These are internal functions used by the QEMU main loop.
- [Qemu-devel] [PATCH v15 05/21] replay: introduce mutex to protect the replay log, (continued)
- [Qemu-devel] [PATCH v15 05/21] replay: introduce mutex to protect the replay log, Pavel Dovgalyuk, 2015/07/01
- [Qemu-devel] [PATCH v15 06/21] replay: introduce icount event, Pavel Dovgalyuk, 2015/07/01
- [Qemu-devel] [PATCH v15 07/21] cpu-exec: allow temporary disabling icount, Pavel Dovgalyuk, 2015/07/01
- [Qemu-devel] [PATCH v15 08/21] cpu: replay instructions sequence, Pavel Dovgalyuk, 2015/07/01
- [Qemu-devel] [PATCH v15 09/21] i386: interrupt poll processing, Pavel Dovgalyuk, 2015/07/01
- [Qemu-devel] [PATCH v15 10/21] replay: interrupts and exceptions, Pavel Dovgalyuk, 2015/07/01
- [Qemu-devel] [PATCH v15 11/21] replay: asynchronous events infrastructure, Pavel Dovgalyuk, 2015/07/01
- [Qemu-devel] [PATCH v15 12/21] replay: recording and replaying clock ticks, Pavel Dovgalyuk, 2015/07/01
- [Qemu-devel] [PATCH v15 13/21] replay: shutdown event, Pavel Dovgalyuk, 2015/07/01
- [Qemu-devel] [PATCH v15 14/21] replay: checkpoints, Pavel Dovgalyuk, 2015/07/01
- [Qemu-devel] [PATCH v15 15/21] bottom halves: introduce bh call function,
Pavel Dovgalyuk <=
- [Qemu-devel] [PATCH v15 16/21] replay: ptimer, Pavel Dovgalyuk, 2015/07/01
- [Qemu-devel] [PATCH v15 17/21] typedef: add typedef for QemuOpts, Pavel Dovgalyuk, 2015/07/01
- [Qemu-devel] [PATCH v15 18/21] replay: initialization and deinitialization, Pavel Dovgalyuk, 2015/07/01
- [Qemu-devel] [PATCH v15 19/21] replay: replay blockers for devices, Pavel Dovgalyuk, 2015/07/01
- [Qemu-devel] [PATCH v15 20/21] replay: command line options, Pavel Dovgalyuk, 2015/07/01
- [Qemu-devel] [PATCH v15 21/21] replay: recording of the user input, Pavel Dovgalyuk, 2015/07/01
- Re: [Qemu-devel] [PATCH v15 00/21] Deterministic replay core, Pavel Dovgaluk, 2015/07/06