From 7791cfd9603d983fe58d3463e94d87448ad9e5a6 Mon Sep 17 00:00:00 2001 From: Chloe Marcec Date: Sat, 30 Jan 2021 21:19:49 +1100 Subject: Drop m_ from lock --- src/core/hle/kernel/k_resource_limit.cpp | 16 ++++++++-------- src/core/hle/kernel/k_resource_limit.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/hle/kernel/k_resource_limit.cpp b/src/core/hle/kernel/k_resource_limit.cpp index b3076b030..65c30e9b3 100644 --- a/src/core/hle/kernel/k_resource_limit.cpp +++ b/src/core/hle/kernel/k_resource_limit.cpp @@ -18,14 +18,14 @@ constexpr s64 DefaultTimeout = 10000000000; // 10 seconds } KResourceLimit::KResourceLimit(KernelCore& kernel, Core::System& system) - : Object{kernel}, m_lock{kernel}, cond_var{kernel}, kernel{kernel}, system(system) {} + : Object{kernel}, lock{kernel}, cond_var{kernel}, kernel{kernel}, system(system) {} KResourceLimit::~KResourceLimit() = default; s64 KResourceLimit::GetLimitValue(LimitableResource which) const { const auto index = static_cast(which); s64 value{}; { - KScopedLightLock lk{m_lock}; + KScopedLightLock lk{lock}; value = limit_values[index]; ASSERT(value >= 0); ASSERT(current_values[index] <= limit_values[index]); @@ -51,7 +51,7 @@ s64 KResourceLimit::GetPeakValue(LimitableResource which) const { const auto index = static_cast(which); s64 value{}; { - KScopedLightLock lk{m_lock}; + KScopedLightLock lk{lock}; value = peak_values[index]; ASSERT(value >= 0); ASSERT(current_values[index] <= limit_values[index]); @@ -64,7 +64,7 @@ s64 KResourceLimit::GetFreeValue(LimitableResource which) const { const auto index = static_cast(which); s64 value{}; { - KScopedLightLock lk(m_lock); + KScopedLightLock lk(lock); ASSERT(current_values[index] >= 0); ASSERT(current_values[index] <= limit_values[index]); ASSERT(current_hints[index] <= current_values[index]); @@ -76,7 +76,7 @@ s64 KResourceLimit::GetFreeValue(LimitableResource which) const { ResultCode KResourceLimit::SetLimitValue(LimitableResource which, s64 value) { const auto index = static_cast(which); - KScopedLightLock lk(m_lock); + KScopedLightLock lk(lock); R_UNLESS(current_values[index] <= value, Svc::ResultInvalidState); limit_values[index] = value; @@ -91,7 +91,7 @@ bool KResourceLimit::Reserve(LimitableResource which, s64 value) { bool KResourceLimit::Reserve(LimitableResource which, s64 value, s64 timeout) { ASSERT(value >= 0); const auto index = static_cast(which); - KScopedLightLock lk(m_lock); + KScopedLightLock lk(lock); ASSERT(current_hints[index] <= current_values[index]); if (current_hints[index] >= limit_values[index]) { @@ -118,7 +118,7 @@ bool KResourceLimit::Reserve(LimitableResource which, s64 value, s64 timeout) { if (current_hints[index] + value <= limit_values[index] && (timeout < 0 || system.CoreTiming().GetGlobalTimeNs().count() < timeout)) { waiter_count++; - cond_var.Wait(&m_lock, timeout); + cond_var.Wait(&lock, timeout); waiter_count--; } else { break; @@ -137,7 +137,7 @@ void KResourceLimit::Release(LimitableResource which, s64 value, s64 hint) { ASSERT(hint >= 0); const auto index = static_cast(which); - KScopedLightLock lk(m_lock); + KScopedLightLock lk(lock); ASSERT(current_values[index] <= limit_values[index]); ASSERT(current_hints[index] <= current_values[index]); ASSERT(value <= current_values[index]); diff --git a/src/core/hle/kernel/k_resource_limit.h b/src/core/hle/kernel/k_resource_limit.h index 84c59177c..5f916c99c 100644 --- a/src/core/hle/kernel/k_resource_limit.h +++ b/src/core/hle/kernel/k_resource_limit.h @@ -71,7 +71,7 @@ private: std::array(LimitableResource::Count)> current_values{}; std::array(LimitableResource::Count)> current_hints{}; std::array(LimitableResource::Count)> peak_values{}; - mutable KLightLock m_lock; + mutable KLightLock lock; s32 waiter_count{}; KLightConditionVariable cond_var; KernelCore& kernel; -- cgit v1.2.3