On 04/29/2016 05:33 PM, Emilio G. Cota wrote:
From: Guillaume Delbergue <guillaume.delber...@greensocs.com>
Signed-off-by: Guillaume Delbergue <guillaume.delber...@greensocs.com>
[Rewritten. - Paolo]
Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
[Emilio's additions: use atomic_test_and_set instead of atomic_xchg;
call cpu_relax() while spinning; optimize for uncontended locks by
acquiring the lock with TAS instead of TATAS.]
Signed-off-by: Emilio G. Cota <c...@braap.org>
---
include/qemu/thread.h | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
Reviewed-by: Richard Henderson <r...@twiddle.net>
r~