aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/semaphore.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-05-26 11:59:57 -0400
committerGitHub <noreply@github.com>2017-05-26 11:59:57 -0400
commit61decd84cc5308bded75eae62c3247a66b3698d8 (patch)
treebbe05121af1a971bc295cb81baeea63f8c54f407 /src/core/hle/kernel/semaphore.cpp
parentbae3799bd5208d08bb52546ad0723103c94cada3 (diff)
parenta5810d61dab191b5a8e3cbb9de9fc9a8bad88826 (diff)
Merge pull request #2716 from yuriks/decentralized-result
Decentralize ResultCode
Diffstat (limited to 'src/core/hle/kernel/semaphore.cpp')
-rw-r--r--src/core/hle/kernel/semaphore.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/hle/kernel/semaphore.cpp b/src/core/hle/kernel/semaphore.cpp
index 8bda2f75d..fcf586728 100644
--- a/src/core/hle/kernel/semaphore.cpp
+++ b/src/core/hle/kernel/semaphore.cpp
@@ -3,6 +3,7 @@
// Refer to the license.txt file included.
#include "common/assert.h"
+#include "core/hle/kernel/errors.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/semaphore.h"
#include "core/hle/kernel/thread.h"
@@ -16,8 +17,7 @@ ResultVal<SharedPtr<Semaphore>> Semaphore::Create(s32 initial_count, s32 max_cou
std::string name) {
if (initial_count > max_count)
- return ResultCode(ErrorDescription::InvalidCombination, ErrorModule::Kernel,
- ErrorSummary::WrongArgument, ErrorLevel::Permanent);
+ return ERR_INVALID_COMBINATION_KERNEL;
SharedPtr<Semaphore> semaphore(new Semaphore);
@@ -42,8 +42,7 @@ void Semaphore::Acquire(Thread* thread) {
ResultVal<s32> Semaphore::Release(s32 release_count) {
if (max_count - available_count < release_count)
- return ResultCode(ErrorDescription::OutOfRange, ErrorModule::Kernel,
- ErrorSummary::InvalidArgument, ErrorLevel::Permanent);
+ return ERR_OUT_OF_RANGE_KERNEL;
s32 previous_count = available_count;
available_count += release_count;