On Fri, Feb 01, 2013 at 11:18:34 +0000, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange(a)redhat.com>
Annotate the fields in virQEMUDriverPtr to indicate the locking
rules for their use
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/qemu/qemu_conf.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
index 4bf1be0..a224ab1 100644
--- a/src/qemu/qemu_conf.h
+++ b/src/qemu/qemu_conf.h
@@ -154,45 +154,67 @@ struct _virQEMUDriverConfig {
struct _virQEMUDriver {
virMutex lock;
...
+ /* Immutable pointer, self-locking APis */
s/APis/APIs/
virPortAllocatorPtr remotePorts;
+ /* Immutable pointer, lockless APIs*/
virSysinfoDefPtr hostsysinfo;
+ /* Immutable pointer. XXX check safety */
virLockManagerPluginPtr lockManager;
+ /* Immutable pointer. Unsafe APIs. XXX */
virHashTablePtr closeCallbacks;
};
ACK with the small typo fixed.
Jirka