From 3eb73b553492a640e773acdb71bb39f912148f01 Mon Sep 17 00:00:00 2001 From: Ivan Chikish Date: Sat, 15 Jul 2023 17:00:47 +0300 Subject: [PATCH] [orbis-kernel] Fix sys_namedobj_delete+ --- orbis-kernel/include/orbis/sys/sysproto.hpp | 2 +- orbis-kernel/include/orbis/thread/Process.hpp | 2 +- orbis-kernel/src/sys/sys_sce.cpp | 4 +--- rpcsx-os/orbis-kernel-config/orbis-config.hpp | 6 ++++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/orbis-kernel/include/orbis/sys/sysproto.hpp b/orbis-kernel/include/orbis/sys/sysproto.hpp index 222653d9f..b5b1259e0 100644 --- a/orbis-kernel/include/orbis/sys/sysproto.hpp +++ b/orbis-kernel/include/orbis/sys/sysproto.hpp @@ -645,7 +645,7 @@ SysResult sys_osem_post(Thread *thread /* TODO */); SysResult sys_osem_cancel(Thread *thread /* TODO */); SysResult sys_namedobj_create(Thread *thread, ptr name, ptr object, uint16_t type); -SysResult sys_namedobj_delete(Thread *thread, uint16_t id, uint16_t type); +SysResult sys_namedobj_delete(Thread *thread, uint id, uint16_t type); SysResult sys_set_vm_container(Thread *thread /* TODO */); SysResult sys_debug_init(Thread *thread /* TODO */); SysResult sys_suspend_process(Thread *thread, pid_t pid); diff --git a/orbis-kernel/include/orbis/thread/Process.hpp b/orbis-kernel/include/orbis/thread/Process.hpp index 0be7a2a1c..4882734f9 100644 --- a/orbis-kernel/include/orbis/thread/Process.hpp +++ b/orbis-kernel/include/orbis/thread/Process.hpp @@ -48,6 +48,6 @@ struct Process { // Named objects for debugging utils::shared_mutex namedObjMutex; utils::kmap namedObjNames; - utils::OwningIdMap namedObjIds; + utils::OwningIdMap namedObjIds; }; } // namespace orbis diff --git a/orbis-kernel/src/sys/sys_sce.cpp b/orbis-kernel/src/sys/sys_sce.cpp index 951fb2b1c..b1be4c453 100644 --- a/orbis-kernel/src/sys/sys_sce.cpp +++ b/orbis-kernel/src/sys/sys_sce.cpp @@ -333,11 +333,9 @@ orbis::SysResult orbis::sys_namedobj_create(Thread *thread, thread->retval[0] = id; return {}; } -orbis::SysResult orbis::sys_namedobj_delete(Thread *thread, uint16_t id, +orbis::SysResult orbis::sys_namedobj_delete(Thread *thread, uint id, uint16_t type) { ORBIS_LOG_NOTICE(__FUNCTION__, id, type); - if (id == 0) - return ErrorCode::SRCH; if (type < 0x101 || type > 0x104) { if (type != 0x107) ORBIS_LOG_ERROR(__FUNCTION__, id, type); diff --git a/rpcsx-os/orbis-kernel-config/orbis-config.hpp b/rpcsx-os/orbis-kernel-config/orbis-config.hpp index 10a140bcf..1a44ca757 100644 --- a/rpcsx-os/orbis-kernel-config/orbis-config.hpp +++ b/rpcsx-os/orbis-kernel-config/orbis-config.hpp @@ -5,9 +5,9 @@ #include #include #include -#include #include #include +#include namespace orbis { using int8_t = std::int8_t; @@ -81,7 +81,9 @@ template [[nodiscard]] ErrorCode uwrite(ptr pointer, T data) { return uwriteRaw(pointer, &data, sizeof(T)); } -template requires (std::is_arithmetic_v && std::is_arithmetic_v && sizeof(T) > sizeof(U) && !std::is_same_v, bool>) +template + requires(std::is_arithmetic_v && std::is_arithmetic_v && + sizeof(T) > sizeof(U) && !std::is_same_v, bool>) [[nodiscard]] ErrorCode uwrite(ptr pointer, U data) { T converted = data; return uwriteRaw(pointer, &converted, sizeof(T));