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
2014-03-12 17:26:40 +01:00
2013-08-07 12:48:00 -05:00
2014-03-03 09:46:27 +04:00
2014-03-12 17:26:40 +01:00
2014-03-13 14:42:21 +01:00
2014-03-13 14:42:21 +01:00
2014-03-12 17:26:32 +01:00
2013-09-05 09:40:31 -05:00
2014-01-08 19:07:20 +00:00
2013-10-11 09:34:56 -07:00
2014-02-11 22:56:37 +10:00
2013-11-04 15:39:41 +02:00
2013-08-12 09:15:12 -05:00
2013-09-03 12:25:55 +02:00
2014-02-21 21:02:23 +01:00
2014-02-25 14:30:28 +01:00
2014-01-24 17:40:03 +01:00
2013-12-04 15:19:00 +01:00
2014-03-05 03:06:24 +01:00
2013-10-11 09:34:56 -07:00
2014-02-20 13:14:18 +01:00
2013-09-25 21:23:05 +02:00
2014-02-17 11:57:23 -05:00
2013-11-27 14:02:45 -08:00
2013-10-11 09:34:56 -07:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team
Description
Languages
C 82.6%
C++ 7%
Python 3.3%
Dylan 2.8%
Shell 1.5%
Other 2.5%