]> Git Repo - qemu.git/commit - async.c
async: add aio_bh_schedule_oneshot
authorPaolo Bonzini <[email protected]>
Mon, 3 Oct 2016 16:14:15 +0000 (18:14 +0200)
committerKevin Wolf <[email protected]>
Fri, 7 Oct 2016 11:34:07 +0000 (13:34 +0200)
commit5b8bb3595a2941e9408021f1080e60ce86d677d2
tree6703cf075db4beb6f35110568491136f7b90ef4e
parent818bbc86c9f9c47f67d11c0a068116c4333fd0ba
async: add aio_bh_schedule_oneshot

qemu_bh_delete is already clearing bh->scheduled at the same time
as it's setting bh->deleted.  Since it's not using any memory
barriers, there is no synchronization going on for bh->deleted,
and this makes the bh->deleted checks superfluous in aio_compute_timeout,
aio_bh_poll and aio_ctx_check.

Just remove them, and put the (bh->scheduled && bh->deleted) combo
to work in a new function aio_bh_schedule_oneshot.  The new function
removes the need to save the QEMUBH pointer between the creation
and the execution of the bottom half.

Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
async.c
include/block/aio.h
This page took 0.025819 seconds and 4 git commands to generate.