Later we can turn APIs to lock the object if needed instead of
relying on caller to mutually exclude itself (probably done by
locking a big lock anyway).
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/network_conf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index f677e3c..399c372 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -52,7 +52,7 @@
#define CLASS_ID_BITMAP_SIZE (1<<16)
struct _virNetworkObjList {
- virObject parent;
+ virObjectLockable parent;
virHashTablePtr objs;
};
@@ -92,7 +92,7 @@ static int virNetworkObjOnceInit(void)
virNetworkObjDispose)))
return -1;
- if (!(virNetworkObjListClass = virClassNew(virClassForObject(),
+ if (!(virNetworkObjListClass = virClassNew(virClassForObjectLockable(),
"virNetworkObjList",
sizeof(virNetworkObjList),
virNetworkObjListDispose)))
@@ -153,7 +153,7 @@ virNetworkObjListPtr virNetworkObjListNew(void)
if (virNetworkObjInitialize() < 0)
return NULL;
- if (!(nets = virObjectNew(virNetworkObjListClass)))
+ if (!(nets = virObjectLockableNew(virNetworkObjListClass)))
return NULL;
if (!(nets->objs = virHashCreate(50, virNetworkObjListDataFree))) {
--
2.0.5