qemu-patch-raspberry4/include/block
Stefan Hajnoczi 02ffb50448 coroutine: stop using AioContext in CoQueue
qemu_co_queue_next(&queue) arranges that the next queued coroutine is
run at a later point in time.  This deferred restart is useful because
the caller may not want to transfer control yet.

This behavior was implemented using QEMUBH in the past, which meant that
CoQueue (and hence CoMutex and CoRwlock) had a dependency on the
AioContext event loop.  This hidden dependency causes trouble when we
move to a world with multiple event loops - now qemu_co_queue_next()
needs to know which event loop to schedule the QEMUBH in.

After pondering how to stash AioContext I realized the best solution is
to not use AioContext at all.  This patch implements the deferred
restart behavior purely in terms of coroutines and no longer uses
QEMUBH.

Here is how it works:

Each Coroutine has a wakeup queue that starts out empty.  When
qemu_co_queue_next() is called, the next coroutine is added to our
wakeup queue.  The wakeup queue is processed when we yield or terminate.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-05-24 16:17:56 +02:00
..
aio.h aio: add a ThreadPool instance to AioContext 2013-03-15 16:07:50 +01:00
block.h block: Add driver-specific options for backing files 2013-04-22 10:27:59 +02:00
block_int.h block: Remove filename parameter from .bdrv_file_open() 2013-04-22 11:34:35 +02:00
blockjob.h block: move include files to include/block/ 2012-12-19 08:31:31 +01:00
coroutine.h coroutine: use AioContext for CoQueue BH 2013-03-15 16:07:51 +01:00
coroutine_int.h coroutine: stop using AioContext in CoQueue 2013-05-24 16:17:56 +02:00
nbd.h nbd: support large NBD requests 2013-05-03 13:05:49 +02:00
scsi.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
thread-pool.h threadpool: drop global thread pool 2013-03-15 16:07:51 +01:00