From d23d504d776007c1244a85ac1b7bb67c407067b2 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 11 Feb 2020 17:36:39 -0400 Subject: Kernel: Refactor synchronization to better match RE --- src/core/hle/kernel/synchronization_object.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/core/hle/kernel/synchronization_object.h') diff --git a/src/core/hle/kernel/synchronization_object.h b/src/core/hle/kernel/synchronization_object.h index a0f891c97..741c31faf 100644 --- a/src/core/hle/kernel/synchronization_object.h +++ b/src/core/hle/kernel/synchronization_object.h @@ -30,6 +30,13 @@ public: /// Acquire/lock the object for the specified thread if it is available virtual void Acquire(Thread* thread) = 0; + /// Signal this object + virtual void Signal(); + + virtual bool IsSignaled() const { + return is_signaled; + } + /** * Add a thread to wait on this object * @param thread Pointer to thread to add @@ -60,6 +67,9 @@ public: /// Get a const reference to the waiting threads list for debug use const std::vector>& GetWaitingThreads() const; +protected: + bool is_signaled{}; // Tells if this sync object is signalled; + private: /// Threads waiting for this object to become available std::vector> waiting_threads; -- cgit v1.2.3