diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2023-03-13 09:16:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-13 09:16:16 -0400 |
| commit | 1f952f6ac9e3aca3dba8e4286fe937616081a767 (patch) | |
| tree | ca57513605bdef4767762614c074ca90b7791575 /src/core/hle/kernel/k_condition_variable.h | |
| parent | 54c359d1e3915653ce07a26e0e574aca5a331cb1 (diff) | |
| parent | c352381ce9196765f7df2b3ff4f6ea1f349781fb (diff) | |
Merge pull request #9936 from liamwhite/m_this
kernel: use consistent style
Diffstat (limited to 'src/core/hle/kernel/k_condition_variable.h')
| -rw-r--r-- | src/core/hle/kernel/k_condition_variable.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/hle/kernel/k_condition_variable.h b/src/core/hle/kernel/k_condition_variable.h index fad4ed011..fbd2c1fc0 100644 --- a/src/core/hle/kernel/k_condition_variable.h +++ b/src/core/hle/kernel/k_condition_variable.h @@ -21,36 +21,36 @@ class KConditionVariable { public: using ThreadTree = typename KThread::ConditionVariableThreadTreeType; - explicit KConditionVariable(Core::System& system_); + explicit KConditionVariable(Core::System& system); ~KConditionVariable(); // Arbitration - [[nodiscard]] Result SignalToAddress(VAddr addr); - [[nodiscard]] Result WaitForAddress(Handle handle, VAddr addr, u32 value); + Result SignalToAddress(VAddr addr); + Result WaitForAddress(Handle handle, VAddr addr, u32 value); // Condition variable void Signal(u64 cv_key, s32 count); - [[nodiscard]] Result Wait(VAddr addr, u64 key, u32 value, s64 timeout); + Result Wait(VAddr addr, u64 key, u32 value, s64 timeout); private: void SignalImpl(KThread* thread); - ThreadTree thread_tree; - - Core::System& system; - KernelCore& kernel; +private: + Core::System& m_system; + KernelCore& m_kernel; + ThreadTree m_tree{}; }; -inline void BeforeUpdatePriority(const KernelCore& kernel, KConditionVariable::ThreadTree* tree, +inline void BeforeUpdatePriority(KernelCore& kernel, KConditionVariable::ThreadTree* tree, KThread* thread) { - ASSERT(kernel.GlobalSchedulerContext().IsLocked()); + ASSERT(KScheduler::IsSchedulerLockedByCurrentThread(kernel)); tree->erase(tree->iterator_to(*thread)); } -inline void AfterUpdatePriority(const KernelCore& kernel, KConditionVariable::ThreadTree* tree, +inline void AfterUpdatePriority(KernelCore& kernel, KConditionVariable::ThreadTree* tree, KThread* thread) { - ASSERT(kernel.GlobalSchedulerContext().IsLocked()); + ASSERT(KScheduler::IsSchedulerLockedByCurrentThread(kernel)); tree->insert(*thread); } |
