[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 09/12] libxl: Add comments to libxlDriverPrivate fields



Similar to the QEMU and LXC drivers, annotate the fields of
libxlDriverPrivate struct to indicate the locking rules for
their use.

Signed-off-by: Jim Fehlig <jfehlig suse com>
---
 src/libxl/libxl_conf.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h
index 83bb6b9..95e0983 100644
--- a/src/libxl/libxl_conf.h
+++ b/src/libxl/libxl_conf.h
@@ -90,19 +90,26 @@ struct _libxlDriverPrivate {
      * then lockless thereafter */
     libxlDriverConfigPtr config;
 
+    /* Atomic inc/dec only */
     unsigned int nactive;
 
+    /* Immutable pointers. Caller must provide locking */
     virStateInhibitCallback inhibitCallback;
     void *inhibitOpaque;
 
+    /* Immutable pointer, self-locking APIs */
     virDomainObjListPtr domains;
 
+    /* Immutable pointer, immutable object */
     virDomainXMLOptionPtr xmlopt;
 
+    /* Immutable pointer, self-locking APIs */
     virDomainEventStatePtr domainEventState;
 
+    /* Immutable pointer, self-locking APIs */
     virPortAllocatorPtr reservedVNCPorts;
 
+    /* Immutable pointer, lockless APIs*/
     virSysinfoDefPtr hostsysinfo;
 };
 
-- 
1.8.1.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]