[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 10/19] add qemu_bh_scheduled
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 10/19] add qemu_bh_scheduled |
Date: |
Mon, 21 Dec 2009 09:09:21 +0100 |
Signed-off-by: Paolo Bonzini <address@hidden>
---
async.c | 5 +++++
qemu-common.h | 2 ++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/async.c b/async.c
index 57ac3a8..d58a1d5 100644
--- a/async.c
+++ b/async.c
@@ -188,6 +188,11 @@ void qemu_bh_cancel(QEMUBH *bh)
bh->scheduled = 0;
}
+bool qemu_bh_scheduled(QEMUBH *bh)
+{
+ return bh->scheduled && !bh->deleted;
+}
+
void qemu_bh_delete(QEMUBH *bh)
{
bh->scheduled = 0;
diff --git a/qemu-common.h b/qemu-common.h
index 8630f8c..fac6a18 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -16,6 +16,7 @@
/* we put basic includes here to avoid repeating them in device drivers */
#include <stdlib.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
@@ -106,6 +107,7 @@ void qemu_bh_schedule(QEMUBH *bh);
* iteration.
*/
void qemu_bh_schedule_idle(QEMUBH *bh);
+bool qemu_bh_scheduled(QEMUBH *bh);
void qemu_bh_cancel(QEMUBH *bh);
void qemu_bh_delete(QEMUBH *bh);
int qemu_bh_poll(void);
--
1.6.5.2
- [Qemu-devel] [PATCH 05/19] only one flag is needed for alarm_timer, (continued)
- [Qemu-devel] [PATCH 05/19] only one flag is needed for alarm_timer, Paolo Bonzini, 2009/12/21
- [Qemu-devel] [PATCH 04/19] fix error in win32_rearm_timer, Paolo Bonzini, 2009/12/21
- [Qemu-devel] [PATCH 07/19] add qemu_get_clock_ns, Paolo Bonzini, 2009/12/21
- [Qemu-devel] [PATCH 09/19] remove qemu_rearm_alarm_timer from main loop, Paolo Bonzini, 2009/12/21
- [Qemu-devel] [PATCH 08/19] move kbd/mouse events to event.c, Paolo Bonzini, 2009/12/21
- [Qemu-devel] [PATCH 11/19] use a bottom half to run timers, Paolo Bonzini, 2009/12/21
[Qemu-devel] [PATCH 10/19] add qemu_bh_scheduled,
Paolo Bonzini <=
[Qemu-devel] [PATCH 06/19] more alarm timer cleanup, Paolo Bonzini, 2009/12/21
[Qemu-devel] [PATCH 16/19] tweak qemu_notify_event, Paolo Bonzini, 2009/12/21
[Qemu-devel] [PATCH 13/19] move tcg_has_work to cpu-exec.c and rename it, Paolo Bonzini, 2009/12/21
[Qemu-devel] [PATCH 12/19] new function qemu_icount_delta, Paolo Bonzini, 2009/12/21
[Qemu-devel] [PATCH 15/19] do not provide qemu_event_increment if iothread not used, Paolo Bonzini, 2009/12/21
[Qemu-devel] [PATCH 14/19] disentangle tcg and deadline calculation, Paolo Bonzini, 2009/12/21
[Qemu-devel] [PATCH 18/19] introduce qemu_clock_enable, Paolo Bonzini, 2009/12/21
[Qemu-devel] [PATCH 17/19] move vmstate registration of vmstate_timers earlier, Paolo Bonzini, 2009/12/21