qemu-irix/include/qemu
Paolo Bonzini e70372fcaf lockable: add QemuLockable
QemuLockable is a polymorphic lock type that takes an object and
knows which function to use for locking and unlocking.  The
implementation could use C11 _Generic, but since the support is
not very widespread I am instead using __builtin_choose_expr and
__builtin_types_compatible_p, which are already used by
include/qemu/atomic.h.

QemuLockable can be used to implement lock guards, or to pass around
a lock in such a way that a function can release it and re-acquire it.
The next patch will do this for CoQueue.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20180203153935.8056-3-pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
2018-02-08 09:22:03 +08:00
..
acl.h
atomic.h memory: avoid "resurrection" of dead FlatViews 2017-09-21 23:19:37 +02:00
base64.h
bcd.h
bitmap.h bitmap: provide to_le/from_le helpers 2017-09-22 14:11:25 +02:00
bitops.h
bswap.h
buffer.h
compiler.h lockable: add QemuLockable 2018-02-08 09:22:03 +08:00
config-file.h
coroutine.h lockable: add QemuLockable 2018-02-08 09:22:03 +08:00
coroutine_int.h coroutine: abort if we try to schedule or enter a pending coroutine 2017-11-21 11:58:07 -05:00
cpuid.h
crc32c.h
cutils.h
envlist.h
error-report.h
event_notifier.h Revert "qemu: add a cleanup callback function to EventNotifier" 2018-01-24 19:20:19 +02:00
fifo8.h
fifo32.h
fprintf-fn.h
futex.h futex: add missing header guards 2017-10-16 20:57:13 +03:00
hbitmap.h hbitmap: add next_zero function 2017-12-18 10:54:13 -05:00
help_option.h
host-utils.h pci/shpc: Move function to generic header file 2018-01-18 21:52:38 +02:00
id.h
int128.h
iov.h
jhash.h
lockable.h lockable: add QemuLockable 2018-02-08 09:22:03 +08:00
log.h
main-loop.h
memfd.h memfd: add hugetlbsize argument 2018-02-07 14:09:25 +01:00
mmap-alloc.h
module.h
notify.h
option.h option: Drop unused get_param_value(), get_next_param_value() 2017-12-20 09:11:50 +01:00
option_int.h
osdep.h sparc: Make sure we mmap at SHMLBA alignment 2017-12-15 15:26:24 +00:00
path.h
processor.h Drop remaining bits of ia64 host support 2018-02-05 18:09:45 +01:00
qdist.h
qht.h qht: fix kernel-doc markup in qht.h 2017-12-18 17:07:02 +03:00
queue.h tcg: Dynamically allocate TCGOps 2017-12-29 12:43:39 -08:00
range.h
ratelimit.h
rcu.h
rcu_queue.h
readline.h readline: add a free function 2018-01-16 14:54:50 +01:00
seqlock.h
sockets.h sockets: remove obsolete code that updated listen address 2017-12-21 09:22:44 +01:00
stats64.h
systemd.h
thread-posix.h thread-posix: fix qemu_rec_mutex_trylock macro 2017-11-14 14:31:33 +01:00
thread-win32.h
thread.h lockable: add QemuLockable 2018-02-08 09:22:03 +08:00
throttle-options.h
throttle.h
timed-average.h
timer.h Drop remaining bits of ia64 host support 2018-02-05 18:09:45 +01:00
typedefs.h lockable: add QemuLockable 2018-02-08 09:22:03 +08:00
unicode.h
uri.h
uuid.h util: add is_equal to UUID API 2017-12-20 22:01:24 +08:00
xattr.h