From 2bc949628dfa2efe9a18660b9d662e2a25cef9f9 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Thu, 13 Feb 2020 17:01:44 -0400 Subject: Core: Address Feedback --- src/core/hle/kernel/synchronization.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/core/hle/kernel/synchronization.h') diff --git a/src/core/hle/kernel/synchronization.h b/src/core/hle/kernel/synchronization.h index 3417a9f13..379f4b1d3 100644 --- a/src/core/hle/kernel/synchronization.h +++ b/src/core/hle/kernel/synchronization.h @@ -6,6 +6,7 @@ #include #include +#include #include "core/hle/kernel/object.h" #include "core/hle/result.h" @@ -16,15 +17,24 @@ class System; namespace Kernel { -class KernelCore; class SynchronizationObject; +/** + * The 'Synchronization' class is an interface for handling synchronization methods + * used by Synchronization objects and synchronization SVCs. This centralizes processing of + * such + */ class Synchronization { public: - Synchronization(Core::System& system); + explicit Synchronization(Core::System& system); + /// Signals a synchronization object, waking up all its waiting threads void SignalObject(SynchronizationObject& obj) const; + /// Tries to see if waiting for any of the sync_objects is necessary, if not + /// it returns Success and the handle index of the signaled sync object. In + /// case not, the current thread will be locked and wait for nano_seconds or + /// for a synchronization object to signal. std::pair WaitFor( std::vector>& sync_objects, s64 nano_seconds); -- cgit v1.2.3