On Tue, Feb 01, 2011 at 05:37:10PM -0700, Eric Blake wrote:
* src/qemu/THREADS.txt: Improve documentation.
---
I'm trying to make sure we don't have any qemu locking gotchas,
given that I've had a bug report of a qemu monitor callback
being able to result in a domaing being unreferenced while
in the middle of another command. As a first shot, I found that
our documentation needed some help.
Also, I have a question. I updated the documentation to match
existing code:
qemuDomainObjExitMonitor()
- - Acquires the virDomainObjPtr lock
- Releases the qemuMonitorObjPtr lock
+ - Acquires the virDomainObjPtr lock
But I'm wondering if that was correct, or if the code should instead
be swapped to match the original ordering in the documentation.
Either way doesn't matter. The lock ordering constraints only
apply to sequences of 'lock' operations. You can 'unlock' any
lock in any order, providing you always honour the 'lock'
order. So changing the docs is fine.
src/qemu/THREADS.txt | 100
++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 77 insertions(+), 23 deletions(-)
ACK
Daniel