summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2020-05-29 05:48:01 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2020-05-29 05:48:01 +0200
commit43bf860b2237cfa873e2452dd8d0b5f43193a05e (patch)
treeda36560cbb84f370878d5d3b18d3a217ed106ffc /src/core/hle/kernel
parentMerge pull request #4002 from lat9nq/fix-nix-mod-directories (diff)
downloadyuzu-43bf860b2237cfa873e2452dd8d0b5f43193a05e.tar
yuzu-43bf860b2237cfa873e2452dd8d0b5f43193a05e.tar.gz
yuzu-43bf860b2237cfa873e2452dd8d0b5f43193a05e.tar.bz2
yuzu-43bf860b2237cfa873e2452dd8d0b5f43193a05e.tar.lz
yuzu-43bf860b2237cfa873e2452dd8d0b5f43193a05e.tar.xz
yuzu-43bf860b2237cfa873e2452dd8d0b5f43193a05e.tar.zst
yuzu-43bf860b2237cfa873e2452dd8d0b5f43193a05e.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/resource_limit.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/core/hle/kernel/resource_limit.cpp b/src/core/hle/kernel/resource_limit.cpp
index d9beaa3a4..212e442f4 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 timeout
new_value = current[index] + amount;
-
- if (timeout >= 0) {
- break;
- }
}
if (new_value <= limit[index]) {