mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
2da61b671eb89fcaa306738f44eed472977d6587
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>
…
…
…
…
…
…
…
Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org - QEMU team
Languages
C
82.1%
C++
6.7%
Python
3.4%
Dylan
2.6%
Shell
1.5%
Other
3.4%