]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
struct _virNetworkDriverState: Annotate items
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 10 Mar 2015 14:42:18 +0000 (15:42 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 13 Mar 2015 14:55:56 +0000 (15:55 +0100)
In order to drop network driver lock, lets annotate which
structure items are immutable, which have self-locking
APIs and so on.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/network/bridge_driver_platform.h

index b7492e638e6bdb320ad7c7ea0e2d1dac5f68d23a..904e73186b5556faa5e73748132aabbc7745647b 100644 (file)
 struct _virNetworkDriverState {
     virMutex lock;
 
+    /* Immutable pointer, self-locking APIs */
     virNetworkObjListPtr networks;
 
+    /* Immutable pointers, Immutable objects */
     char *networkConfigDir;
     char *networkAutostartDir;
     char *stateDir;
     char *pidDir;
     char *dnsmasqStateDir;
     char *radvdStateDir;
+
+    /* Require lock to get a reference on the object,
+     * lockless access thereafter
+     */
     dnsmasqCapsPtr dnsmasqCaps;
 
+    /* Immutable pointer, self-locking APIs */
     virObjectEventStatePtr networkEventState;
 };