diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-02-01 02:26:16 +0100 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-02-02 18:37:08 +0100 |
commit | 52f58e64efbf43c114f701eb8f39fb463138ffb8 (patch) | |
tree | eb40cc649b524febe841e463d6de7bce025a8105 /src/core/hle/kernel/kernel.cpp | |
parent | Explicitly instantiate constructors/destructors for Kernel objects (diff) | |
download | yuzu-52f58e64efbf43c114f701eb8f39fb463138ffb8.tar yuzu-52f58e64efbf43c114f701eb8f39fb463138ffb8.tar.gz yuzu-52f58e64efbf43c114f701eb8f39fb463138ffb8.tar.bz2 yuzu-52f58e64efbf43c114f701eb8f39fb463138ffb8.tar.lz yuzu-52f58e64efbf43c114f701eb8f39fb463138ffb8.tar.xz yuzu-52f58e64efbf43c114f701eb8f39fb463138ffb8.tar.zst yuzu-52f58e64efbf43c114f701eb8f39fb463138ffb8.zip |
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index a24c2f69f..7e0b9542e 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -20,10 +20,10 @@ SharedPtr<Thread> g_main_thread = nullptr; HandleTable g_handle_table; u64 g_program_id = 0; -void WaitObject::AddWaitingThread(Thread* thread) { +void WaitObject::AddWaitingThread(SharedPtr<Thread> thread) { auto itr = std::find(waiting_threads.begin(), waiting_threads.end(), thread); if (itr == waiting_threads.end()) - waiting_threads.push_back(thread); + waiting_threads.push_back(std::move(thread)); } void WaitObject::RemoveWaitingThread(Thread* thread) { @@ -32,11 +32,11 @@ void WaitObject::RemoveWaitingThread(Thread* thread) { waiting_threads.erase(itr); } -Thread* WaitObject::WakeupNextThread() { +SharedPtr<Thread> WaitObject::WakeupNextThread() { if (waiting_threads.empty()) return nullptr; - auto next_thread = waiting_threads.front(); + auto next_thread = std::move(waiting_threads.front()); waiting_threads.erase(waiting_threads.begin()); next_thread->ReleaseWaitObject(this); |