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(a)redhat.com>
---
src/network/bridge_driver_platform.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/network/bridge_driver_platform.h b/src/network/bridge_driver_platform.h
index b7492e6..904e731 100644
--- a/src/network/bridge_driver_platform.h
+++ b/src/network/bridge_driver_platform.h
@@ -34,16 +34,23 @@
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;
};
--
2.0.5