From 49719c8a44d0492a86c1306291fd4d1dc43e53e9 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 18 Apr 2018 12:23:06 -0600 Subject: [PATCH] Stratosphere: Add missing priority updates --- stratosphere/loader/source/waitablemanager.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/stratosphere/loader/source/waitablemanager.cpp b/stratosphere/loader/source/waitablemanager.cpp index 386ea6ec9..702cadb3b 100644 --- a/stratosphere/loader/source/waitablemanager.cpp +++ b/stratosphere/loader/source/waitablemanager.cpp @@ -45,6 +45,10 @@ void WaitableManager::process() { /* Handle a signaled waitable. */ /* TODO: What should be done with the result here? */ signalables[handle_index]->handle_signaled(); + + for (int i = 0; i < handle_index; i++) { + signalables[i]->update_priority(); + } } else if (rc == 0xEA01) { /* Timeout. */ for (auto & waitable : signalables) { @@ -64,7 +68,11 @@ void WaitableManager::process() { signalables[handle_index]->get_parent()->delete_child(signalables[handle_index]); } else { delete signalables[handle_index]; - } + } + + for (int i = 0; i < handle_index; i++) { + signalables[i]->update_priority(); + } } else { /* TODO: Panic. When can this happen? */ }