diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-02-11 22:36:39 +0100 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2020-02-11 23:47:31 +0100 |
commit | d23d504d776007c1244a85ac1b7bb67c407067b2 (patch) | |
tree | d6e992004bf752819084d648ca8b81fd1fc1db18 /src/core/hle/kernel/synchronization_object.h | |
parent | Kernel: Change WaitObject to Synchronization object. In order to better reflect RE. (diff) | |
download | yuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.tar yuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.tar.gz yuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.tar.bz2 yuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.tar.lz yuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.tar.xz yuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.tar.zst yuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/synchronization_object.h | 10 |
1 files changed, 10 insertions, 0 deletions
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<std::shared_ptr<Thread>>& GetWaitingThreads() const; +protected: + bool is_signaled{}; // Tells if this sync object is signalled; + private: /// Threads waiting for this object to become available std::vector<std::shared_ptr<Thread>> waiting_threads; |