summaryrefslogtreecommitdiff
path: root/qemu-common.h
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-31 17:42:00 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-31 17:42:00 +0000
commit80d3580b29d84221650fd2dc7f26706d50f21197 (patch)
treed4e9bf18d1a1a87b0dd5f73b7f21431c4a7c4b8e /qemu-common.h
parent5ccfae10a79e52654c9edc68da6d05f29466b4f9 (diff)
downloadqemu-80d3580b29d84221650fd2dc7f26706d50f21197.tar.gz
Clarify qemu_bh_schedule_idle() usage
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5576 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'qemu-common.h')
-rw-r--r--qemu-common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/qemu-common.h b/qemu-common.h
index 0c6f4de3f2..f23d7b4cc7 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -70,6 +70,12 @@ typedef void QEMUBHFunc(void *opaque);
QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque);
void qemu_bh_schedule(QEMUBH *bh);
+/* Bottom halfs that are scheduled from a bottom half handler are instantly
+ * invoked. This can create an infinite loop if a bottom half handler
+ * schedules itself. qemu_bh_schedule_idle() avoids this infinite loop by
+ * ensuring that the bottom half isn't executed until the next main loop
+ * iteration.
+ */
void qemu_bh_schedule_idle(QEMUBH *bh);
void qemu_bh_cancel(QEMUBH *bh);
void qemu_bh_delete(QEMUBH *bh);