[PATCH 0/3] Cleanup CoQueue restart functions

Paolo Bonzini posted 3 patches 2 years ago
block/io.c                 |  2 +-
include/qemu/coroutine.h   | 27 +++++++++++++++++-----
ui/console.c               |  2 +-
util/qemu-coroutine-lock.c | 47 +++++++++++++++-----------------------
4 files changed, 42 insertions(+), 36 deletions(-)
[PATCH 0/3] Cleanup CoQueue restart functions
Posted by Paolo Bonzini 2 years ago
Sending this out now that NBD's incorrect uses have been fixed.

There is no equivalent of qemu_co_queue_enter_next that restarts all
coroutines but that is incorrect because qemu_co_queue_restart_all should
really be a coroutine_fn.  The NBD uses have been fixed by removing the
calls to qemu_co_queue_restart_all; graphic_hw_update_done works just
because it uses the BQL; but the new rwlock for the BlockDriverState
graph will need it.

The series introduces the new function, removes some duplicated code
around it, and marks qemu_co_queue_next and qemu_co_queue_restart_all
as coroutine_fn.

Paolo

Paolo Bonzini (3):
  coroutine-lock: qemu_co_queue_next is a coroutine-only
    qemu_co_enter_next
  coroutine-lock: introduce qemu_co_queue_enter_all
  coroutine-lock: qemu_co_queue_restart_all is a coroutine-only
    qemu_co_enter_all

 block/io.c                 |  2 +-
 include/qemu/coroutine.h   | 27 +++++++++++++++++-----
 ui/console.c               |  2 +-
 util/qemu-coroutine-lock.c | 47 +++++++++++++++-----------------------
 4 files changed, 42 insertions(+), 36 deletions(-)

-- 
2.35.1