diff options
author | bunnei <bunneidev@gmail.com> | 2015-05-20 02:24:30 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-05-21 00:05:47 +0200 |
commit | 0b7d2941cf358cfdbfd32b0e5fb8fcca4180336f (patch) | |
tree | bce96a583e8069dc22e508df62de6cd03f394efc /src/core/hle/kernel/thread.cpp | |
parent | Merge pull request #783 from jroweboy/cond-wait (diff) | |
download | yuzu-0b7d2941cf358cfdbfd32b0e5fb8fcca4180336f.tar yuzu-0b7d2941cf358cfdbfd32b0e5fb8fcca4180336f.tar.gz yuzu-0b7d2941cf358cfdbfd32b0e5fb8fcca4180336f.tar.bz2 yuzu-0b7d2941cf358cfdbfd32b0e5fb8fcca4180336f.tar.lz yuzu-0b7d2941cf358cfdbfd32b0e5fb8fcca4180336f.tar.xz yuzu-0b7d2941cf358cfdbfd32b0e5fb8fcca4180336f.tar.zst yuzu-0b7d2941cf358cfdbfd32b0e5fb8fcca4180336f.zip |
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r-- | src/core/hle/kernel/thread.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index a5f1904d7..690d33b55 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -109,6 +109,8 @@ void Thread::Stop() { } Kernel::g_current_process->used_tls_slots[tls_index] = false; + + HLE::Reschedule(__func__); } Thread* ArbitrateHighestPriorityThread(u32 address) { @@ -232,6 +234,8 @@ static Thread* PopNextReadyThread() { void WaitCurrentThread_Sleep() { Thread* thread = GetCurrentThread(); thread->status = THREADSTATUS_WAIT_SLEEP; + + HLE::Reschedule(__func__); } void WaitCurrentThread_WaitSynchronization(std::vector<SharedPtr<WaitObject>> wait_objects, bool wait_set_output, bool wait_all) { @@ -431,6 +435,8 @@ ResultVal<SharedPtr<Thread>> Thread::Create(std::string name, VAddr entry_point, ready_queue.push_back(thread->current_priority, thread.get()); thread->status = THREADSTATUS_READY; + HLE::Reschedule(__func__); + return MakeResult<SharedPtr<Thread>>(std::move(thread)); } |