mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
virNetworkObjList: Derive from virObjectLockableClass
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@redhat.com>
This commit is contained in:
parent
5a84a07857
commit
52430928d1
@ -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)))
|
||||
@ -146,7 +146,7 @@ virNetworkObjListPtr virNetworkObjListNew(void)
|
||||
if (virNetworkObjInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(nets = virObjectNew(virNetworkObjListClass)))
|
||||
if (!(nets = virObjectLockableNew(virNetworkObjListClass)))
|
||||
return NULL;
|
||||
|
||||
if (!(nets->objs = virHashCreate(50, virObjectFreeHashData))) {
|
||||
|
Loading…
Reference in New Issue
Block a user