VERY experimental Nintendo Switch 2 emulator
C++
kernel: ResourceLimit::Reserve remove useless while loop
David Marcec55b534c5a0dc
diff --git a/src/core/hle/kernel/resource_limit.cpp b/src/core/hle/kernel/resource_limit.cppindex d9beaa3a40..212e442f42 100644--- a/src/core/hle/kernel/resource_limit.cpp+++ b/src/core/hle/kernel/resource_limit.cpp@@ -24,13 +24,9 @@ bool ResourceLimit::Reserve(ResourceType resource, s64 amount, u64 timeout) {const std::size_t index{ResourceTypeToIndex(resource)};s64 new_value = current[index] + amount;- while (new_value > limit[index] && available[index] + amount <= limit[index]) {+ if (new_value > limit[index] && available[index] + amount <= limit[index]) {// TODO(bunnei): This is wrong for multicore, we should wait the calling thread for timeoutnew_value = current[index] + amount;-- if (timeout >= 0) {- break;- }}if (new_value <= limit[index]) {