From: aliguori Date: Fri, 31 Oct 2008 17:42:00 +0000 (+0000) Subject: Clarify qemu_bh_schedule_idle() usage X-Git-Tag: TizenStudio_2.0_p2.3~10650 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ebb1aff5dda295ebd1a21ae70e2f00e11429594;p=sdk%2Femulator%2Fqemu.git Clarify qemu_bh_schedule_idle() usage Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5576 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/qemu-common.h b/qemu-common.h index 0c6f4de..f23d7b4 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);