Re: [Qemu-devel] [PATCH 3/5] coroutine-lock: convert CoQueue to use QemuLockable

2018-02-03 Thread Richard Henderson
On 02/03/2018 07:39 AM, Paolo Bonzini wrote: > There are cases in which a queued coroutine must be restarted from > non-coroutine context (with qemu_co_enter_next). In this cases, > qemu_co_enter_next also needs to be thread-safe, but it cannot use > a CoMutex and so cannot qemu_co_queue_wait. Us

[Qemu-devel] [PATCH 3/5] coroutine-lock: convert CoQueue to use QemuLockable

2018-02-03 Thread Paolo Bonzini
There are cases in which a queued coroutine must be restarted from non-coroutine context (with qemu_co_enter_next). In this cases, qemu_co_enter_next also needs to be thread-safe, but it cannot use a CoMutex and so cannot qemu_co_queue_wait. Use QemuLockable so that the CoQueue can interchangeabl

[Qemu-devel] [PATCH 3/5] coroutine-lock: convert CoQueue to use QemuLockable

2018-02-01 Thread Paolo Bonzini
There are cases in which a queued coroutine must be restarted from non-coroutine context (with qemu_co_enter_next). In this cases, qemu_co_enter_next also needs to be thread-safe, but it cannot use a CoMutex and so cannot qemu_co_queue_wait. Use QemuLockable so that the CoQueue can interchangeabl

Re: [Qemu-devel] [PATCH 3/5] coroutine-lock: convert CoQueue to use QemuLockable

2018-01-29 Thread Stefan Hajnoczi
On Thu, Jan 25, 2018 at 06:59:47PM +0100, Paolo Bonzini wrote: > There are cases in which a queued coroutine must be restarted from > non-coroutine context (with qemu_co_enter_next). In this cases, > qemu_co_enter_next also needs to be thread-safe, but it cannot use > a CoMutex and so cannot qemu_

[Qemu-devel] [PATCH 3/5] coroutine-lock: convert CoQueue to use QemuLockable

2018-01-25 Thread Paolo Bonzini
There are cases in which a queued coroutine must be restarted from non-coroutine context (with qemu_co_enter_next). In this cases, qemu_co_enter_next also needs to be thread-safe, but it cannot use a CoMutex and so cannot qemu_co_queue_wait. Use QemuLockable so that the CoQueue can interchangeabl