]> xenbits.xensource.com Git - libvirt.git/commitdiff
libxl: Add comments to libxlDriverPrivate fields
authorJim Fehlig <jfehlig@suse.com>
Fri, 30 Aug 2013 20:55:52 +0000 (14:55 -0600)
committerJim Fehlig <jfehlig@suse.com>
Tue, 3 Sep 2013 22:43:21 +0000 (16:43 -0600)
Similar to the QEMU and LXC drivers, annotate the fields of
libxlDriverPrivate struct to indicate the locking rules for
their use.

src/libxl/libxl_conf.h

index 83bb6b975e24fa4c90207ec919d67d0d4789f3e1..95e09832c4bdb5b228c7e30d83990a31ebfe8baa 100644 (file)
@@ -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;
 };