Re: [Qemu-devel] [PATCH 1/6] coroutine-lock: make CoMutex thread-safe

2017-02-16 Thread Stefan Hajnoczi
On Mon, Feb 13, 2017 at 07:12:39PM +0100, Paolo Bonzini wrote: > diff --git a/tests/test-aio-multithread.c b/tests/test-aio-multithread.c > index 534807d..ada8c48 100644 > --- a/tests/test-aio-multithread.c > +++ b/tests/test-aio-multithread.c > @@ -196,6 +196,88 @@ static void test_multi_co_schedu

[Qemu-devel] [PATCH 1/6] coroutine-lock: make CoMutex thread-safe

2017-02-13 Thread Paolo Bonzini
This uses the lock-free mutex described in the paper '"Blocking without Locking", or LFTHREADS: A lock-free thread library' by Gidenstam and Papatriantafilou. The same technique is used in OSv, and in fact the code is essentially a conversion to C of OSv's code. Signed-off-by: Paolo Bonzini ---