mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
async: Add an optional reentrancy guard to the BH API
Devices can pass their MemoryReentrancyGuard (from their DeviceState), when creating new BHes. Then, the async API will toggle the guard before/after calling the BH call-back. This prevents bh->mmio reentrancy issues. Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Message-Id: <20230427211013.2994127-3-alxndr@bu.edu> [thuth: Fix "line over 90 characters" checkpatch.pl error] Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
committed by
Thomas Huth
parent
a2e1753b80
commit
9c86c97f12
@ -605,9 +605,11 @@ void main_loop_wait(int nonblocking)
|
||||
|
||||
/* Functions to operate on the main QEMU AioContext. */
|
||||
|
||||
QEMUBH *qemu_bh_new_full(QEMUBHFunc *cb, void *opaque, const char *name)
|
||||
QEMUBH *qemu_bh_new_full(QEMUBHFunc *cb, void *opaque, const char *name,
|
||||
MemReentrancyGuard *reentrancy_guard)
|
||||
{
|
||||
return aio_bh_new_full(qemu_aio_context, cb, opaque, name);
|
||||
return aio_bh_new_full(qemu_aio_context, cb, opaque, name,
|
||||
reentrancy_guard);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user