提交 e5cd28c0 编写于 作者: M Michael Chapman 提交者: Ján Tomko

datatypes: update comments of Dispose functions

As of commit 46ec5f85, the conn.lock mutex does not need to be held
when calling any vir*Dispose() function in datatypes.c (via virObjectUnref()).
Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 cb9bd796
...@@ -129,9 +129,7 @@ error: ...@@ -129,9 +129,7 @@ error:
* @conn: the hypervisor connection to release * @conn: the hypervisor connection to release
* *
* Unconditionally release all memory associated with a connection. * Unconditionally release all memory associated with a connection.
* The conn.lock mutex must be held prior to calling this, and will * The connection object must not be used once this method returns.
* be released prior to this returning. The connection obj must not
* be used once this method returns.
*/ */
static void static void
virConnectDispose(void *obj) virConnectDispose(void *obj)
...@@ -239,9 +237,7 @@ error: ...@@ -239,9 +237,7 @@ error:
* @domain: the domain to release * @domain: the domain to release
* *
* Unconditionally release all memory associated with a domain. * Unconditionally release all memory associated with a domain.
* The conn.lock mutex must be held prior to calling this, and will * The domain object must not be used once this method returns.
* be released prior to this returning. The domain obj must not
* be used once this method returns.
* *
* It will also unreference the associated connection object, * It will also unreference the associated connection object,
* which may also be released if its ref count hits zero. * which may also be released if its ref count hits zero.
...@@ -306,9 +302,7 @@ error: ...@@ -306,9 +302,7 @@ error:
* @network: the network to release * @network: the network to release
* *
* Unconditionally release all memory associated with a network. * Unconditionally release all memory associated with a network.
* The conn.lock mutex must be held prior to calling this, and will * The network object must not be used once this method returns.
* be released prior to this returning. The network obj must not
* be used once this method returns.
* *
* It will also unreference the associated connection object, * It will also unreference the associated connection object,
* which may also be released if its ref count hits zero. * which may also be released if its ref count hits zero.
...@@ -377,9 +371,7 @@ error: ...@@ -377,9 +371,7 @@ error:
* @interface: the interface to release * @interface: the interface to release
* *
* Unconditionally release all memory associated with an interface. * Unconditionally release all memory associated with an interface.
* The conn.lock mutex must be held prior to calling this, and will * The interface object must not be used once this method returns.
* be released prior to this returning. The interface obj must not
* be used once this method returns.
* *
* It will also unreference the associated connection object, * It will also unreference the associated connection object,
* which may also be released if its ref count hits zero. * which may also be released if its ref count hits zero.
...@@ -451,9 +443,7 @@ error: ...@@ -451,9 +443,7 @@ error:
* @pool: the pool to release * @pool: the pool to release
* *
* Unconditionally release all memory associated with a pool. * Unconditionally release all memory associated with a pool.
* The conn.lock mutex must be held prior to calling this, and will * The pool object must not be used once this method returns.
* be released prior to this returning. The pool obj must not
* be used once this method returns.
* *
* It will also unreference the associated connection object, * It will also unreference the associated connection object,
* which may also be released if its ref count hits zero. * which may also be released if its ref count hits zero.
...@@ -532,10 +522,8 @@ error: ...@@ -532,10 +522,8 @@ error:
* virStorageVolDispose: * virStorageVolDispose:
* @vol: the vol to release * @vol: the vol to release
* *
* Unconditionally release all memory associated with a vol. * Unconditionally release all memory associated with a volume.
* The conn.lock mutex must be held prior to calling this, and will * The volume object must not be used once this method returns.
* be released prior to this returning. The vol obj must not
* be used once this method returns.
* *
* It will also unreference the associated connection object, * It will also unreference the associated connection object,
* which may also be released if its ref count hits zero. * which may also be released if its ref count hits zero.
...@@ -599,10 +587,8 @@ error: ...@@ -599,10 +587,8 @@ error:
* virNodeDeviceDispose: * virNodeDeviceDispose:
* @dev: the dev to release * @dev: the dev to release
* *
* Unconditionally release all memory associated with a dev. * Unconditionally release all memory associated with a device.
* The conn.lock mutex must be held prior to calling this, and will * The device object must not be used once this method returns.
* be released prior to this returning. The dev obj must not
* be used once this method returns.
* *
* It will also unreference the associated connection object, * It will also unreference the associated connection object,
* which may also be released if its ref count hits zero. * which may also be released if its ref count hits zero.
...@@ -666,12 +652,11 @@ error: ...@@ -666,12 +652,11 @@ error:
* virSecretDispose: * virSecretDispose:
* @secret: the secret to release * @secret: the secret to release
* *
* Unconditionally release all memory associated with a secret. The conn.lock * Unconditionally release all memory associated with a secret.
* mutex must be held prior to calling this, and will be released prior to this * The secret object must not be used once this method returns.
* returning. The secret obj must not be used once this method returns.
* *
* It will also unreference the associated connection object, which may also be * It will also unreference the associated connection object,
* released if its ref count hits zero. * which may also be released if its ref count hits zero.
*/ */
static void static void
virSecretDispose(void *obj) virSecretDispose(void *obj)
...@@ -762,9 +747,7 @@ error: ...@@ -762,9 +747,7 @@ error:
* @nwfilter: the nwfilter to release * @nwfilter: the nwfilter to release
* *
* Unconditionally release all memory associated with a nwfilter. * Unconditionally release all memory associated with a nwfilter.
* The conn.lock mutex must be held prior to calling this, and will * The nwfilter object must not be used once this method returns.
* be released prior to this returning. The nwfilter obj must not
* be used once this method returns.
* *
* It will also unreference the associated connection object, * It will also unreference the associated connection object,
* which may also be released if its ref count hits zero. * which may also be released if its ref count hits zero.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册