summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/thread.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-02-11 15:46:25 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-02-11 15:46:25 +0100
commitc5aefe42aaec7afa29d317709cacc8524f7add20 (patch)
tree5f9341ac7eb10d85b52c5a70e217f80963dc9e99 /src/core/hle/kernel/thread.h
parentMerge pull request #3372 from ReinUsesLisp/fix-back-stencil (diff)
downloadyuzu-c5aefe42aaec7afa29d317709cacc8524f7add20.tar
yuzu-c5aefe42aaec7afa29d317709cacc8524f7add20.tar.gz
yuzu-c5aefe42aaec7afa29d317709cacc8524f7add20.tar.bz2
yuzu-c5aefe42aaec7afa29d317709cacc8524f7add20.tar.lz
yuzu-c5aefe42aaec7afa29d317709cacc8524f7add20.tar.xz
yuzu-c5aefe42aaec7afa29d317709cacc8524f7add20.tar.zst
yuzu-c5aefe42aaec7afa29d317709cacc8524f7add20.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/thread.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index 3bcf9e137..895258095 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -11,7 +11,7 @@
#include "common/common_types.h"
#include "core/arm/arm_interface.h"
#include "core/hle/kernel/object.h"
-#include "core/hle/kernel/wait_object.h"
+#include "core/hle/kernel/synchronization_object.h"
#include "core/hle/result.h"
namespace Kernel {
@@ -95,7 +95,7 @@ enum class ThreadSchedMasks : u32 {
ForcePauseMask = 0x0070,
};
-class Thread final : public WaitObject {
+class Thread final : public SynchronizationObject {
public:
explicit Thread(KernelCore& kernel);
~Thread() override;
@@ -104,11 +104,11 @@ public:
using ThreadContext = Core::ARM_Interface::ThreadContext;
- using ThreadWaitObjects = std::vector<std::shared_ptr<WaitObject>>;
+ using ThreadSynchronizationObjects = std::vector<std::shared_ptr<SynchronizationObject>>;
using WakeupCallback =
std::function<bool(ThreadWakeupReason reason, std::shared_ptr<Thread> thread,
- std::shared_ptr<WaitObject> object, std::size_t index)>;
+ std::shared_ptr<SynchronizationObject> object, std::size_t index)>;
/**
* Creates and returns a new thread. The new thread is immediately scheduled
@@ -233,7 +233,7 @@ public:
*
* @param object Object to query the index of.
*/
- s32 GetWaitObjectIndex(std::shared_ptr<WaitObject> object) const;
+ s32 GetSynchronizationObjectIndex(std::shared_ptr<SynchronizationObject> object) const;
/**
* Stops a thread, invalidating it from further use
@@ -314,15 +314,15 @@ public:
return owner_process;
}
- const ThreadWaitObjects& GetWaitObjects() const {
+ const ThreadSynchronizationObjects& GetSynchronizationObjects() const {
return wait_objects;
}
- void SetWaitObjects(ThreadWaitObjects objects) {
+ void SetSynchronizationObjects(ThreadSynchronizationObjects objects) {
wait_objects = std::move(objects);
}
- void ClearWaitObjects() {
+ void ClearSynchronizationObjects() {
for (const auto& waiting_object : wait_objects) {
waiting_object->RemoveWaitingThread(SharedFrom(this));
}
@@ -330,7 +330,7 @@ public:
}
/// Determines whether all the objects this thread is waiting on are ready.
- bool AllWaitObjectsReady() const;
+ bool AllSynchronizationObjectsReady() const;
const MutexWaitingThreads& GetMutexWaitingThreads() const {
return wait_mutex_threads;
@@ -395,7 +395,7 @@ public:
* will cause an assertion to trigger.
*/
bool InvokeWakeupCallback(ThreadWakeupReason reason, std::shared_ptr<Thread> thread,
- std::shared_ptr<WaitObject> object, std::size_t index);
+ std::shared_ptr<SynchronizationObject> object, std::size_t index);
u32 GetIdealCore() const {
return ideal_core;
@@ -494,7 +494,7 @@ private:
/// Objects that the thread is waiting on, in the same order as they were
/// passed to WaitSynchronization.
- ThreadWaitObjects wait_objects;
+ ThreadSynchronizationObjects wait_objects;
/// List of threads that are waiting for a mutex that is held by this thread.
MutexWaitingThreads wait_mutex_threads;