To facilitate later patches this introduces lock & unlock API calls for
each internal object which are just no-ops. Once all the drivers are
updated to call this at appropriate places, the stubs will be filled
out with actual locking impls. This ensures each intermediate patch
still results in a functional system
domain_conf.c | 8 ++++++++
domain_conf.h | 2 ++
libvirt_sym.version.in | 8 ++++++++
network_conf.c | 8 ++++++++
network_conf.h | 3 +++
node_device_conf.c | 8 ++++++++
node_device_conf.h | 3 +++
storage_conf.c | 9 +++++++++
storage_conf.h | 3 +++
9 files changed, 52 insertions(+)
Daniel
diff --git a/src/domain_conf.c b/src/domain_conf.c
--- a/src/domain_conf.c
+++ b/src/domain_conf.c
@@ -3459,4 +3459,12 @@ const char *virDomainDefDefaultEmulator(
}
+void virDomainObjLock(virDomainObjPtr obj ATTRIBUTE_UNUSED)
+{
+}
+
+void virDomainObjUnlock(virDomainObjPtr obj ATTRIBUTE_UNUSED)
+{
+}
+
#endif /* ! PROXY */
diff --git a/src/domain_conf.h b/src/domain_conf.h
--- a/src/domain_conf.h
+++ b/src/domain_conf.h
@@ -591,6 +591,8 @@ const char *virDomainDefDefaultEmulator(
virDomainDefPtr def,
virCapsPtr caps);
+void virDomainObjLock(virDomainObjPtr obj);
+void virDomainObjUnlock(virDomainObjPtr obj);
VIR_ENUM_DECL(virDomainVirt)
VIR_ENUM_DECL(virDomainBoot)
diff --git a/src/libvirt_sym.version.in b/src/libvirt_sym.version.in
--- a/src/libvirt_sym.version.in
+++ b/src/libvirt_sym.version.in
@@ -373,6 +373,8 @@ LIBVIRT_PRIVATE_@VERSION@ {
virDomainSoundModelTypeToString;
virDomainVirtTypeToString;
virDomainFSDefFree;
+ virDomainObjLock;
+ virDomainObjUnlock;
/* domain_event.h */
@@ -477,6 +479,8 @@ LIBVIRT_PRIVATE_@VERSION@ {
virNetworkDefParseNode;
virNetworkRemoveInactive;
virNetworkSaveConfig;
+ virNetworkObjLock;
+ virNetworkObjUnlock;
/* nodeinfo.h */
@@ -491,6 +495,8 @@ LIBVIRT_PRIVATE_@VERSION@ {
virNodeDeviceDefFree;
virNodeDevCapsDefFree;
virNodeDeviceDefFormat;
+ virNodeDeviceObjLock;
+ virNodeDeviceObjUnlock;
/* qparams.h */
@@ -544,6 +550,8 @@ LIBVIRT_PRIVATE_@VERSION@ {
virStoragePoolFormatFileSystemNetTypeToString;
virStorageVolFormatFileSystemTypeToString;
virStoragePoolTypeFromString;
+ virStoragePoolObjLock;
+ virStoragePoolObjUnlock;
/* util.h */
diff --git a/src/network_conf.c b/src/network_conf.c
--- a/src/network_conf.c
+++ b/src/network_conf.c
@@ -811,3 +811,11 @@ int virNetworkDeleteConfig(virConnectPtr
return 0;
}
+
+void virNetworkObjLock(virNetworkObjPtr obj ATTRIBUTE_UNUSED)
+{
+}
+
+void virNetworkObjUnlock(virNetworkObjPtr obj ATTRIBUTE_UNUSED)
+{
+}
diff --git a/src/network_conf.h b/src/network_conf.h
--- a/src/network_conf.h
+++ b/src/network_conf.h
@@ -155,5 +155,8 @@ int virNetworkDeleteConfig(virConnectPtr
int virNetworkDeleteConfig(virConnectPtr conn,
virNetworkObjPtr net);
+void virNetworkObjLock(virNetworkObjPtr obj);
+void virNetworkObjUnlock(virNetworkObjPtr obj);
+
#endif /* __NETWORK_CONF_H__ */
diff --git a/src/node_device_conf.c b/src/node_device_conf.c
--- a/src/node_device_conf.c
+++ b/src/node_device_conf.c
@@ -397,3 +397,11 @@ void virNodeDevCapsDefFree(virNodeDevCap
VIR_FREE(caps);
}
+
+void virNodeDeviceObjLock(virNodeDeviceObjPtr obj ATTRIBUTE_UNUSED)
+{
+}
+
+void virNodeDeviceObjUnlock(virNodeDeviceObjPtr obj ATTRIBUTE_UNUSED)
+{
+}
diff --git a/src/node_device_conf.h b/src/node_device_conf.h
--- a/src/node_device_conf.h
+++ b/src/node_device_conf.h
@@ -190,4 +190,7 @@ void virNodeDeviceObjListFree(virNodeDev
void virNodeDevCapsDefFree(virNodeDevCapsDefPtr caps);
+void virNodeDeviceObjLock(virNodeDeviceObjPtr obj);
+void virNodeDeviceObjUnlock(virNodeDeviceObjPtr obj);
+
#endif /* __VIR_NODE_DEVICE_CONF_H__ */
diff --git a/src/storage_conf.c b/src/storage_conf.c
--- a/src/storage_conf.c
+++ b/src/storage_conf.c
@@ -1497,3 +1497,12 @@ char *virStoragePoolSourceListFormat(vir
free(virBufferContentAndReset(&buf));
return NULL;
}
+
+
+void virStoragePoolObjLock(virStoragePoolObjPtr obj ATTRIBUTE_UNUSED)
+{
+}
+
+void virStoragePoolObjUnlock(virStoragePoolObjPtr obj ATTRIBUTE_UNUSED)
+{
+}
diff --git a/src/storage_conf.h b/src/storage_conf.h
--- a/src/storage_conf.h
+++ b/src/storage_conf.h
@@ -326,6 +326,9 @@ char *virStoragePoolSourceListFormat(vir
char *virStoragePoolSourceListFormat(virConnectPtr conn,
virStoragePoolSourceListPtr def);
+void virStoragePoolObjLock(virStoragePoolObjPtr obj);
+void virStoragePoolObjUnlock(virStoragePoolObjPtr obj);
+
enum virStoragePoolFormatFileSystem {
VIR_STORAGE_POOL_FS_AUTO = 0,
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|