summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-08-25 11:44:51 +0200
committerLioncash <mathew1800@gmail.com>2018-08-25 15:40:21 +0200
commit81ca46dd17dafa2a474a6f8eed748d604516034d (patch)
treeebec2110b01f8a243d0834828ebad7ef50ab5ac1 /src
parentkernel/error: Add error code for invalid memory permissions (diff)
downloadyuzu-81ca46dd17dafa2a474a6f8eed748d604516034d.tar
yuzu-81ca46dd17dafa2a474a6f8eed748d604516034d.tar.gz
yuzu-81ca46dd17dafa2a474a6f8eed748d604516034d.tar.bz2
yuzu-81ca46dd17dafa2a474a6f8eed748d604516034d.tar.lz
yuzu-81ca46dd17dafa2a474a6f8eed748d604516034d.tar.xz
yuzu-81ca46dd17dafa2a474a6f8eed748d604516034d.tar.zst
yuzu-81ca46dd17dafa2a474a6f8eed748d604516034d.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/errors.h4
-rw-r--r--src/core/hle/kernel/handle_table.cpp2
-rw-r--r--src/core/hle/kernel/handle_table.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/errors.h b/src/core/hle/kernel/errors.h
index 8b4e05191..59c5c2a67 100644
--- a/src/core/hle/kernel/errors.h
+++ b/src/core/hle/kernel/errors.h
@@ -11,7 +11,6 @@ namespace Kernel {
namespace ErrCodes {
enum {
// TODO(Subv): Remove these 3DS OS error codes.
- OutOfHandles = 19,
SessionClosedByRemote = 26,
PortNameTooLong = 30,
NoPendingSessions = 35,
@@ -20,6 +19,7 @@ enum {
// Confirmed Switch OS error codes
InvalidAddress = 102,
+ HandleTableFull = 105,
InvalidMemoryState = 106,
InvalidMemoryPermissions = 108,
InvalidProcessorId = 113,
@@ -37,7 +37,7 @@ enum {
// double check that the code matches before re-using the constant.
// TODO(bunnei): Replace these with correct errors for Switch OS
-constexpr ResultCode ERR_OUT_OF_HANDLES(-1);
+constexpr ResultCode ERR_HANDLE_TABLE_FULL(ErrorModule::Kernel, ErrCodes::HandleTableFull);
constexpr ResultCode ERR_SESSION_CLOSED_BY_REMOTE(-1);
constexpr ResultCode ERR_PORT_NAME_TOO_LONG(-1);
constexpr ResultCode ERR_MAX_CONNECTIONS_REACHED(-1);
diff --git a/src/core/hle/kernel/handle_table.cpp b/src/core/hle/kernel/handle_table.cpp
index 28e21428a..6d9f7a02b 100644
--- a/src/core/hle/kernel/handle_table.cpp
+++ b/src/core/hle/kernel/handle_table.cpp
@@ -26,7 +26,7 @@ ResultVal<Handle> HandleTable::Create(SharedPtr<Object> obj) {
u16 slot = next_free_slot;
if (slot >= generations.size()) {
LOG_ERROR(Kernel, "Unable to allocate Handle, too many slots in use.");
- return ERR_OUT_OF_HANDLES;
+ return ERR_HANDLE_TABLE_FULL;
}
next_free_slot = generations[slot];
diff --git a/src/core/hle/kernel/handle_table.h b/src/core/hle/kernel/handle_table.h
index 22ddda630..aee3583e8 100644
--- a/src/core/hle/kernel/handle_table.h
+++ b/src/core/hle/kernel/handle_table.h
@@ -47,7 +47,7 @@ public:
/**
* Allocates a handle for the given object.
* @return The created Handle or one of the following errors:
- * - `ERR_OUT_OF_HANDLES`: the maximum number of handles has been exceeded.
+ * - `ERR_HANDLE_TABLE_FULL`: the maximum number of handles has been exceeded.
*/
ResultVal<Handle> Create(SharedPtr<Object> obj);