Some of the fields are either immutable or self locking, so make a note of that for future reference. --- src/test/test_driver.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index f105055..0cd8e6a 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -96,11 +96,7 @@ struct _testDriver { virMutex lock; int nextDomID; - virCapsPtr caps; - virDomainXMLOptionPtr xmlopt; virNodeInfo nodeInfo; - virDomainObjListPtr domains; - virNetworkObjListPtr networks; virInterfaceObjList ifaces; bool transaction_running; virInterfaceObjList backupIfaces; @@ -111,6 +107,16 @@ struct _testDriver { size_t numAuths; testAuthPtr auths; + /* immutable pointer, immutable object after being initialized with + * testBuildCapabilities */ + virCapsPtr caps; + + /* immutable pointer, immutable object */ + virDomainXMLOptionPtr xmlopt; + + /* immutable pointer, self-locking APIs */ + virDomainObjListPtr domains; + virNetworkObjListPtr networks; virObjectEventStatePtr eventState; }; typedef struct _testDriver testDriver; -- 2.4.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list