summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-06-13 04:30:19 +0200
committerGitHub <noreply@github.com>2020-06-13 04:30:19 +0200
commite1911e5c8b1d18eb9d328b253d0834f04d420e2f (patch)
treef5ed9c4bf745ee0ff8e043a5b25700eb91091e8e /src/core
parentMerge pull request #4027 from ReinUsesLisp/3d-slices (diff)
parentkernel: ResourceLimit::Reserve remove useless while loop (diff)
downloadyuzu-e1911e5c8b1d18eb9d328b253d0834f04d420e2f.tar
yuzu-e1911e5c8b1d18eb9d328b253d0834f04d420e2f.tar.gz
yuzu-e1911e5c8b1d18eb9d328b253d0834f04d420e2f.tar.bz2
yuzu-e1911e5c8b1d18eb9d328b253d0834f04d420e2f.tar.lz
yuzu-e1911e5c8b1d18eb9d328b253d0834f04d420e2f.tar.xz
yuzu-e1911e5c8b1d18eb9d328b253d0834f04d420e2f.tar.zst
yuzu-e1911e5c8b1d18eb9d328b253d0834f04d420e2f.zip
Diffstat (limited to 'src/core')
-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]) {