From 9a1e94812913667fe52d01c8ee2b7efe5f404478 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 22 Oct 2009 17:54:38 +0200 Subject: Introduce contexts for asynchronous callbacks Add the possibility to use AIO and BHs without allowing foreign callbacks to be run. Basically, you put your own AIOs and BHs in a separate context. For details see the comments in the source. Signed-off-by: Kevin Wolf Signed-off-by: Anthony Liguori --- qemu-common.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'qemu-common.h') diff --git a/qemu-common.h b/qemu-common.h index 3e73bf9523..b779cfe69d 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -93,6 +93,10 @@ typedef struct QEMUBH QEMUBH; typedef void QEMUBHFunc(void *opaque); +void async_context_push(void); +void async_context_pop(void); +int get_async_context_id(void); + 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 -- cgit v1.2.3