mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-28 04:21:50 -06: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:
parent
a2e1753b80
commit
9c86c97f12
7 changed files with 52 additions and 8 deletions
|
@ -387,9 +387,12 @@ void qemu_cond_timedwait_iothread(QemuCond *cond, int ms);
|
|||
|
||||
/* internal interfaces */
|
||||
|
||||
#define qemu_bh_new_guarded(cb, opaque, guard) \
|
||||
qemu_bh_new_full((cb), (opaque), (stringify(cb)), guard)
|
||||
#define qemu_bh_new(cb, opaque) \
|
||||
qemu_bh_new_full((cb), (opaque), (stringify(cb)))
|
||||
QEMUBH *qemu_bh_new_full(QEMUBHFunc *cb, void *opaque, const char *name);
|
||||
qemu_bh_new_full((cb), (opaque), (stringify(cb)), NULL)
|
||||
QEMUBH *qemu_bh_new_full(QEMUBHFunc *cb, void *opaque, const char *name,
|
||||
MemReentrancyGuard *reentrancy_guard);
|
||||
void qemu_bh_schedule_idle(QEMUBH *bh);
|
||||
|
||||
enum {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue