diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_auto_object_container.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_auto_object_container.hpp index f89839e8c..60ac2fef5 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_auto_object_container.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_auto_object_container.hpp @@ -56,8 +56,8 @@ namespace ams::kern { void Initialize() { MESOSPHERE_ASSERT_THIS(); } void Finalize() { MESOSPHERE_ASSERT_THIS(); } - Result Register(KAutoObjectWithList *obj); - Result Unregister(KAutoObjectWithList *obj); + void Register(KAutoObjectWithList *obj); + void Unregister(KAutoObjectWithList *obj); size_t GetOwnedCount(KProcess *owner); }; diff --git a/libraries/libmesosphere/include/mesosphere/kern_slab_helpers.hpp b/libraries/libmesosphere/include/mesosphere/kern_slab_helpers.hpp index b34150cbd..9f62be183 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_slab_helpers.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_slab_helpers.hpp @@ -108,7 +108,7 @@ namespace ams::kern { return obj; } - static Result Register(Derived *obj) { + static void Register(Derived *obj) { return s_container.Register(obj); } diff --git a/libraries/libmesosphere/source/kern_k_auto_object_container.cpp b/libraries/libmesosphere/source/kern_k_auto_object_container.cpp index aebbc8ec8..5fbdacca9 100644 --- a/libraries/libmesosphere/source/kern_k_auto_object_container.cpp +++ b/libraries/libmesosphere/source/kern_k_auto_object_container.cpp @@ -18,24 +18,20 @@ namespace ams::kern { - Result KAutoObjectWithListContainer::Register(KAutoObjectWithList *obj) { + void KAutoObjectWithListContainer::Register(KAutoObjectWithList *obj) { MESOSPHERE_ASSERT_THIS(); KScopedLightLock lk(this->lock); this->object_list.insert(*obj); - - return ResultSuccess(); } - Result KAutoObjectWithListContainer::Unregister(KAutoObjectWithList *obj) { + void KAutoObjectWithListContainer::Unregister(KAutoObjectWithList *obj) { MESOSPHERE_ASSERT_THIS(); KScopedLightLock lk(this->lock); this->object_list.erase(this->object_list.iterator_to(*obj)); - - return ams::svc::ResultNotFound(); } size_t KAutoObjectWithListContainer::GetOwnedCount(KProcess *owner) { diff --git a/libraries/libmesosphere/source/svc/kern_svc_code_memory.cpp b/libraries/libmesosphere/source/svc/kern_svc_code_memory.cpp index 2ab4b878c..9d898c62d 100644 --- a/libraries/libmesosphere/source/svc/kern_svc_code_memory.cpp +++ b/libraries/libmesosphere/source/svc/kern_svc_code_memory.cpp @@ -56,7 +56,7 @@ namespace ams::kern::svc { R_TRY(code_mem->Initialize(address, size)); /* Register the code memory. */ - R_TRY(KCodeMemory::Register(code_mem)); + KCodeMemory::Register(code_mem); /* Add the code memory to the handle table. */ R_TRY(GetCurrentProcess().GetHandleTable().Add(out, code_mem)); diff --git a/libraries/libmesosphere/source/svc/kern_svc_device_address_space.cpp b/libraries/libmesosphere/source/svc/kern_svc_device_address_space.cpp index 84f36b0bf..fd45f1f29 100644 --- a/libraries/libmesosphere/source/svc/kern_svc_device_address_space.cpp +++ b/libraries/libmesosphere/source/svc/kern_svc_device_address_space.cpp @@ -43,7 +43,7 @@ namespace ams::kern::svc { R_TRY(das->Initialize(das_address, das_size)); /* Register the device address space. */ - R_TRY(KDeviceAddressSpace::Register(das)); + KDeviceAddressSpace::Register(das); /* Add to the handle table. */ R_TRY(GetCurrentProcess().GetHandleTable().Add(out, das)); diff --git a/libraries/libmesosphere/source/svc/kern_svc_event.cpp b/libraries/libmesosphere/source/svc/kern_svc_event.cpp index 4a2f68eff..fc34ddb7c 100644 --- a/libraries/libmesosphere/source/svc/kern_svc_event.cpp +++ b/libraries/libmesosphere/source/svc/kern_svc_event.cpp @@ -81,7 +81,7 @@ namespace ams::kern::svc { }; /* Register the event. */ - R_TRY(KEvent::Register(event)); + KEvent::Register(event); /* Add the writable event to the handle table. */ R_TRY(handle_table.Add(out_write, std::addressof(event->GetWritableEvent()))); diff --git a/libraries/libmesosphere/source/svc/kern_svc_interrupt_event.cpp b/libraries/libmesosphere/source/svc/kern_svc_interrupt_event.cpp index 6019820d8..7d8e4c48c 100644 --- a/libraries/libmesosphere/source/svc/kern_svc_interrupt_event.cpp +++ b/libraries/libmesosphere/source/svc/kern_svc_interrupt_event.cpp @@ -51,7 +51,7 @@ namespace ams::kern::svc { R_TRY(event->Initialize(interrupt_id, type)); /* Register the event. */ - R_TRY(KInterruptEvent::Register(event)); + KInterruptEvent::Register(event); /* Add the event to the handle table. */ R_TRY(handle_table.Add(out, event)); diff --git a/libraries/libmesosphere/source/svc/kern_svc_ipc.cpp b/libraries/libmesosphere/source/svc/kern_svc_ipc.cpp index bacdbd6db..ac95372d6 100644 --- a/libraries/libmesosphere/source/svc/kern_svc_ipc.cpp +++ b/libraries/libmesosphere/source/svc/kern_svc_ipc.cpp @@ -187,7 +187,7 @@ namespace ams::kern::svc { }; /* Register the event. */ - R_TRY(KEvent::Register(event)); + KEvent::Register(event); /* Add the readable event to the handle table. */ R_TRY(handle_table.Add(out_event_handle, std::addressof(event->GetReadableEvent()))); diff --git a/libraries/libmesosphere/source/svc/kern_svc_port.cpp b/libraries/libmesosphere/source/svc/kern_svc_port.cpp index 3b802f27e..1d1171889 100644 --- a/libraries/libmesosphere/source/svc/kern_svc_port.cpp +++ b/libraries/libmesosphere/source/svc/kern_svc_port.cpp @@ -46,7 +46,7 @@ namespace ams::kern::svc { port->Initialize(max_sessions, false, 0); /* Register the port. */ - R_TRY(KPort::Register(port)); + KPort::Register(port); /* Register the handle in the table. */ handle_table.Register(*out_server_handle, std::addressof(port->GetServerPort())); @@ -95,7 +95,7 @@ namespace ams::kern::svc { }; /* Register the port. */ - R_TRY(KPort::Register(port)); + KPort::Register(port); /* Add the client to the handle table. */ R_TRY(handle_table.Add(out_client, std::addressof(port->GetClientPort()))); diff --git a/libraries/libmesosphere/source/svc/kern_svc_process.cpp b/libraries/libmesosphere/source/svc/kern_svc_process.cpp index c279b21be..2d517f471 100644 --- a/libraries/libmesosphere/source/svc/kern_svc_process.cpp +++ b/libraries/libmesosphere/source/svc/kern_svc_process.cpp @@ -230,7 +230,7 @@ namespace ams::kern::svc { R_TRY(process->Initialize(params, user_caps, num_caps, process_resource_limit, pool)); /* Register the process. */ - R_TRY(KProcess::Register(process)); + KProcess::Register(process); /* Add the process to the handle table. */ R_TRY(handle_table.Add(out, process)); diff --git a/libraries/libmesosphere/source/svc/kern_svc_resource_limit.cpp b/libraries/libmesosphere/source/svc/kern_svc_resource_limit.cpp index 3640c614e..9ff4da0f8 100644 --- a/libraries/libmesosphere/source/svc/kern_svc_resource_limit.cpp +++ b/libraries/libmesosphere/source/svc/kern_svc_resource_limit.cpp @@ -78,8 +78,8 @@ namespace ams::kern::svc { /* Initialize the resource limit. */ resource_limit->Initialize(); - /* Try to register the limit. */ - R_TRY(KResourceLimit::Register(resource_limit)); + /* Register the limit. */ + KResourceLimit::Register(resource_limit); /* Add the limit to the handle table. */ R_TRY(GetCurrentProcess().GetHandleTable().Add(out_handle, resource_limit)); diff --git a/libraries/libmesosphere/source/svc/kern_svc_session.cpp b/libraries/libmesosphere/source/svc/kern_svc_session.cpp index 8b70dd29c..dc4e54dc3 100644 --- a/libraries/libmesosphere/source/svc/kern_svc_session.cpp +++ b/libraries/libmesosphere/source/svc/kern_svc_session.cpp @@ -48,7 +48,7 @@ namespace ams::kern::svc { }; /* Register the session. */ - R_TRY(T::Register(session)); + T::Register(session); /* Add the server session to the handle table. */ R_TRY(handle_table.Add(out_server, std::addressof(session->GetServerSession()))); diff --git a/libraries/libmesosphere/source/svc/kern_svc_shared_memory.cpp b/libraries/libmesosphere/source/svc/kern_svc_shared_memory.cpp index 91326a975..d971fe85a 100644 --- a/libraries/libmesosphere/source/svc/kern_svc_shared_memory.cpp +++ b/libraries/libmesosphere/source/svc/kern_svc_shared_memory.cpp @@ -117,7 +117,7 @@ namespace ams::kern::svc { R_TRY(shmem->Initialize(GetCurrentProcessPointer(), size, owner_perm, remote_perm)); /* Register the shared memory. */ - R_TRY(KSharedMemory::Register(shmem)); + KSharedMemory::Register(shmem); /* Add the shared memory to the handle table. */ R_TRY(GetCurrentProcess().GetHandleTable().Add(out, shmem)); diff --git a/libraries/libmesosphere/source/svc/kern_svc_thread.cpp b/libraries/libmesosphere/source/svc/kern_svc_thread.cpp index 7bd9dfd1d..81a35a171 100644 --- a/libraries/libmesosphere/source/svc/kern_svc_thread.cpp +++ b/libraries/libmesosphere/source/svc/kern_svc_thread.cpp @@ -61,7 +61,7 @@ namespace ams::kern::svc { thread->GetContext().CloneFpuStatus(); /* Register the new thread. */ - R_TRY(KThread::Register(thread)); + KThread::Register(thread); /* Add the thread to the handle table. */ R_TRY(process.GetHandleTable().Add(out, thread)); diff --git a/libraries/libmesosphere/source/svc/kern_svc_transfer_memory.cpp b/libraries/libmesosphere/source/svc/kern_svc_transfer_memory.cpp index ce435d44e..061600138 100644 --- a/libraries/libmesosphere/source/svc/kern_svc_transfer_memory.cpp +++ b/libraries/libmesosphere/source/svc/kern_svc_transfer_memory.cpp @@ -111,7 +111,7 @@ namespace ams::kern::svc { trmem_reservation.Commit(); /* Register the transfer memory. */ - R_TRY(KTransferMemory::Register(trmem)); + KTransferMemory::Register(trmem); /* Add the transfer memory to the handle table. */ R_TRY(handle_table.Add(out, trmem));