xemu/fsdev
Paolo Bonzini 5261dd7b01 coroutine-lock: make qemu_co_enter_next thread-safe
qemu_co_queue_next does not need to release and re-acquire the mutex,
because the queued coroutine does not run immediately.  However, this
does not hold for qemu_co_enter_next.  Now that qemu_co_queue_wait
can synchronize (via QemuLockable) with code that is not running in
coroutine context, it's important that code using qemu_co_enter_next
can easily use a standardized locking idiom.

First of all, qemu_co_enter_next must use aio_co_wake to restart the
coroutine.  Second, the function gains a second argument, a QemuLockable*,
and the comments of qemu_co_queue_next and qemu_co_queue_restart_all
are adjusted to clarify the difference.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20180203153935.8056-5-pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
2018-02-08 09:22:03 +08:00
..
9p-iov-marshal.c fsdev: don't allow unknown format in marshal/unmarshal 2017-05-25 10:30:13 +02:00
9p-iov-marshal.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
9p-marshal.c 9pfs: drop useless v9fs_string_null() function 2016-09-16 08:56:15 +02:00
9p-marshal.h 9pfs: fsdev: drop useless extern annotation for functions 2016-10-17 14:13:58 +02:00
file-op-9p.h fsdev: improve error handling of backend init 2018-01-08 11:18:23 +01:00
Makefile.objs 9pfs: fix dependencies 2017-08-30 18:23:25 +02:00
qemu-fsdev-dummy.c 9p/fsdev: remove obsolete references to virtio 2016-06-06 11:52:34 +02:00
qemu-fsdev-opts.c 9pfs: local: Add support for custom fmode/dmode in 9ps mapped security modes 2017-06-29 15:11:50 +02:00
qemu-fsdev-throttle.c coroutine-lock: make qemu_co_enter_next thread-safe 2018-02-08 09:22:03 +08:00
qemu-fsdev-throttle.h fsdev: add IO throttle support to fsdev devices 2017-02-28 10:31:46 +01:00
qemu-fsdev.c fsdev: improve error handling of backend opts parsing 2018-01-08 11:18:23 +01:00
qemu-fsdev.h 9p/fsdev: remove obsolete references to virtio 2016-06-06 11:52:34 +02:00
virtfs-proxy-helper.c fsdev: fix memory leak in main() 2017-09-05 14:01:16 +02:00
virtfs-proxy-helper.texi fsdev: spelling fix 2016-06-07 18:02:49 +03:00