aboutsummaryrefslogtreecommitdiff
path: root/include/qemu/thread-posix.h
diff options
context:
space:
mode:
authorGuillaume Delbergue <guillaume.delbergue@greensocs.com>2016-06-08 14:55:23 -0400
committerRichard Henderson <rth@twiddle.net>2016-06-11 23:10:18 +0000
commitac9a9eba1e43c5354905c0c7f8e17852ed396ac2 (patch)
tree97891a6037c6c942d770c3aba6c945d916a9fecc /include/qemu/thread-posix.h
parent462cda505f304c3915e5e30429cee22418f5a6ea (diff)
downloadqemu-ac9a9eba1e43c5354905c0c7f8e17852ed396ac2.zip
qemu-ac9a9eba1e43c5354905c0c7f8e17852ed396ac2.tar.gz
qemu-ac9a9eba1e43c5354905c0c7f8e17852ed396ac2.tar.bz2
qemu-thread: add simple test-and-set spinlock
Reviewed-by: Sergey Fedorov <sergey.fedorov@linaro.org> Signed-off-by: Guillaume Delbergue <guillaume.delbergue@greensocs.com> [Rewritten. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [Emilio's additions: use TAS instead of atomic_xchg; emit acquire/release barriers; return bool from trylock; call cpu_relax() while spinning; optimize for uncontended locks by acquiring the lock with TAS instead of TATAS; add qemu_spin_locked().] Signed-off-by: Emilio G. Cota <cota@braap.org> Message-Id: <1465412133-3029-6-git-send-email-cota@braap.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'include/qemu/thread-posix.h')
0 files changed, 0 insertions, 0 deletions