qemu-e2k/util
Stefan Hajnoczi 2da61b671e rfifolock: add recursive FIFO lock
QemuMutex does not guarantee fairness and cannot be acquired
recursively:

Fairness means each locker gets a turn and the scheduler cannot cause
starvation.

Recursive locking is useful for composition, it allows a sequence of
locking operations to be invoked atomically by acquiring the lock around
them.

This patch adds RFifoLock, a recursive lock that guarantees FIFO order.
Its first user is added in the next patch.

RFifoLock has one additional feature: it can be initialized with an
optional contention callback.  The callback is invoked whenever a thread
must wait for the lock.  For example, it can be used to poke the current
owner so that they release the lock soon.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13 14:42:21 +01:00
..
acl.c
aes.c aes: Remove unused code (NDEBUG, u16) 2013-07-27 11:22:53 +04:00
bitmap.c bitmap: use long as index 2014-01-13 14:04:53 +01:00
bitops.c
cache-utils.c util: Use qemu_getauxval in linux qemu_cache_utils_init 2013-11-30 07:45:30 +13:00
compatfd.c Add a 'name' parameter to qemu_thread_create 2014-03-09 21:09:38 +02:00
crc32c.c
cutils.c
envlist.c
error.c Revert "error: Don't use error_report() for assertion msgs." 2014-01-17 09:50:11 +10:00
event_notifier-posix.c
event_notifier-win32.c
fifo8.c util/fifo8: clear fifo head upon reset 2014-02-08 14:50:48 +00:00
getauxval.c osdep: Create qemu_getauxval and qemu_init_auxval 2013-11-30 07:45:13 +13:00
hbitmap.c
hexdump.c
host-utils.c target-ppc: Add ISA2.06 divde[o] Instructions 2014-03-05 03:06:39 +01:00
iov.c util/iov: Use qemu/sockets.h instead of conditional code 2014-03-03 09:46:27 +04:00
Makefile.objs rfifolock: add recursive FIFO lock 2014-03-13 14:42:21 +01:00
module.c modules: Fix building with --enable-modules 2014-02-28 12:30:13 +00:00
notify.c
osdep.c osdep: drop unused #include "trace.h" 2014-02-01 13:42:38 +04:00
oslib-posix.c util: Split out exec_dir from os_find_datadir 2014-02-20 13:12:54 +01:00
oslib-win32.c util: Split out exec_dir from os_find_datadir 2014-02-20 13:12:54 +01:00
path.c util/path: Fix type which is longer than 8 bit for MinGW 2013-10-05 14:01:47 +04:00
qemu-config.c qemu-config: Sections must consist of keys 2014-02-21 22:11:17 +01:00
qemu-error.c add timestamp to error_report() 2013-07-10 13:42:09 -04:00
qemu-openpty.c
qemu-option.c qemu-option: has_help_option() and is_valid_option_list() 2014-02-21 22:10:17 +01:00
qemu-progress.c qemu-progress: Fix progress printing on SIGUSR1 2014-01-24 14:33:00 +01:00
qemu-sockets.c qemu-option: Remove qemu_opts_create_nofail 2014-01-06 15:02:30 -05:00
qemu-thread-posix.c qemu-thread-posix: Fix build against older glibc version 2014-03-11 18:19:21 +00:00
qemu-thread-win32.c Add a 'name' parameter to qemu_thread_create 2014-03-09 21:09:38 +02:00
qemu-timer-common.c
readline.c readline: move readline to a generic location 2014-01-22 12:07:17 +01:00
rfifolock.c rfifolock: add recursive FIFO lock 2014-03-13 14:42:21 +01:00
throttle.c throttle: Add a new throttling API implementing continuous leaky bucket. 2013-09-06 15:25:07 +02:00
unicode.c
uri.c