Re: [Qemu-devel] [PATCH 05/10] include: add spinlock wrapper

2016-04-06 Thread Alex Bennée
Paolo Bonzini writes: > On 05/04/2016 07:30, Emilio G. Cota wrote: >> Wrap pthread_spin on POSIX, or QemuMutex on Windows. >> >> AFAIK there are is no off-the-shelf spinlock implementation for >> Windows, so we'll just use QemuMutex. > > It's much simpler to use a simple test-and-set spinlock. >

Re: [Qemu-devel] [PATCH 05/10] include: add spinlock wrapper

2016-04-05 Thread Paolo Bonzini
On 05/04/2016 07:30, Emilio G. Cota wrote: > Wrap pthread_spin on POSIX, or QemuMutex on Windows. > > AFAIK there are is no off-the-shelf spinlock implementation for > Windows, so we'll just use QemuMutex. It's much simpler to use a simple test-and-set spinlock. GitHub is down, but this should

[Qemu-devel] [PATCH 05/10] include: add spinlock wrapper

2016-04-04 Thread Emilio G. Cota
Wrap pthread_spin on POSIX, or QemuMutex on Windows. AFAIK there are is no off-the-shelf spinlock implementation for Windows, so we'll just use QemuMutex. Signed-off-by: Emilio G. Cota --- include/qemu/spinlock-posix.h | 60 +++ include/qemu/spinlock-win3