mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
remote_driver: Return 'virLockGuard' from 'remoteDriverLock'
The function currently didn't have a return value. Returning the 'virLockGuard' struct allows the callers to use automatic unlocking of the mutex. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
1be393d9ad
commit
8d7e3a723d
@ -105,9 +105,17 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void remoteDriverLock(struct private_data *driver)
|
/**
|
||||||
|
* remoteDriverLock:
|
||||||
|
* @driver: private data of the remote driver
|
||||||
|
*
|
||||||
|
* Locks the internal mutex of the private driver. Callers may optionally use
|
||||||
|
* the returned virLockGuard struct to automatically unlock the driver.
|
||||||
|
*/
|
||||||
|
static virLockGuard
|
||||||
|
remoteDriverLock(struct private_data *driver)
|
||||||
{
|
{
|
||||||
virMutexLock(&driver->lock);
|
return virLockGuardLock(&driver->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void remoteDriverUnlock(struct private_data *driver)
|
static void remoteDriverUnlock(struct private_data *driver)
|
||||||
|
Loading…
Reference in New Issue
Block a user