mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
resctrl: Rename virResctrlLockWrite -> virResctrlLock
There is no distinction between Read/Write locks for resctrl from libvirt's point of view any more. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
c8bb95912e
commit
4ea1395ce4
@ -456,7 +456,7 @@ VIR_ONCE_GLOBAL_INIT(virResctrl);
|
||||
#ifndef WIN32
|
||||
|
||||
static int
|
||||
virResctrlLockWrite(void)
|
||||
virResctrlLock(void)
|
||||
{
|
||||
int fd = open(SYSFS_RESCTRL_PATH, O_RDONLY | O_CLOEXEC);
|
||||
|
||||
@ -499,7 +499,7 @@ virResctrlUnlock(int fd)
|
||||
#else /* WIN32 */
|
||||
|
||||
static int
|
||||
virResctrlLockWrite(void)
|
||||
virResctrlLock(void)
|
||||
{
|
||||
virReportSystemError(ENOSYS, "%s",
|
||||
_("resctrl locking is not supported "
|
||||
@ -2416,7 +2416,7 @@ virResctrlAllocCreate(virResctrlInfoPtr resctrl,
|
||||
if (STREQ(alloc->path, SYSFS_RESCTRL_PATH))
|
||||
return 0;
|
||||
|
||||
lockfd = virResctrlLockWrite();
|
||||
lockfd = virResctrlLock();
|
||||
if (lockfd < 0)
|
||||
goto cleanup;
|
||||
|
||||
@ -2609,7 +2609,7 @@ virResctrlMonitorCreate(virResctrlMonitorPtr monitor,
|
||||
if (virResctrlMonitorDeterminePath(monitor, machinename) < 0)
|
||||
return -1;
|
||||
|
||||
lockfd = virResctrlLockWrite();
|
||||
lockfd = virResctrlLock();
|
||||
if (lockfd < 0)
|
||||
return -1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user