From c2588403c0b8cf198f13f903f626851c7e94266c Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Thu, 23 Oct 2014 01:20:01 -0200 Subject: HLE: Revamp error handling throrough the HLE code All service calls in the CTR OS return result codes indicating the success or failure of the call. Previous to this commit, Citra's HLE emulation of services and the kernel universally either ignored errors or returned dummy -1 error codes. This commit makes an initial effort to provide an infrastructure for error reporting and propagation which can be use going forward to make HLE calls accurately return errors as the original system. A few parts of the code have been updated to use the new system where applicable. One part of this effort is the definition of the `ResultCode` type, which provides facilities for constructing and parsing error codes in the structured format used by the CTR. The `ResultVal` type builds on `ResultCode` by providing a container for values returned by function that can report errors. It enforces that correct error checking will be done on function returns by preventing the use of the return value if the function returned an error code. Currently this change is mostly internal since errors are still suppressed on the ARM<->HLE border, as a temporary compatibility hack. As functionality is implemented and tested this hack can be eventually removed. --- src/core/hle/service/fs_user.cpp | 66 +++++++++++++++++---------------------- src/core/hle/service/gsp_gpu.cpp | 17 ++++------ src/core/hle/service/hid_user.cpp | 5 +-- src/core/hle/service/service.cpp | 2 +- src/core/hle/service/service.h | 12 +++---- src/core/hle/service/srv.cpp | 6 ++-- 6 files changed, 46 insertions(+), 62 deletions(-) (limited to 'src/core/hle/service') diff --git a/src/core/hle/service/fs_user.cpp b/src/core/hle/service/fs_user.cpp index 2aec1a52a..435be5b5d 100644 --- a/src/core/hle/service/fs_user.cpp +++ b/src/core/hle/service/fs_user.cpp @@ -4,26 +4,24 @@ #include "common/common.h" -#include "fs_user.h" #include "common/string_util.h" -#include "core/settings.h" #include "core/hle/kernel/archive.h" +#include "core/hle/kernel/archive.h" +#include "core/hle/result.h" +#include "core/hle/service/fs_user.h" +#include "core/settings.h" //////////////////////////////////////////////////////////////////////////////////////////////////// // Namespace FS_User namespace FS_User { -// We currently return 0 for success and -1 for failure in cmd_buff[1]. -1 was chosen because it -// puts all the sections of the http://3dbrew.org/wiki/Error_codes to something non-zero, to make -// sure we don't mislead the application into thinking something worked. - static void Initialize(Service::Interface* self) { u32* cmd_buff = Service::GetCommandBuffer(); // TODO(Link Mauve): check the behavior when cmd_buff[1] isn't 32, as per // http://3dbrew.org/wiki/FS:Initialize#Request - cmd_buff[1] = 0; + cmd_buff[1] = RESULT_SUCCESS.raw; DEBUG_LOG(KERNEL, "called"); } @@ -59,14 +57,12 @@ static void OpenFile(Service::Interface* self) { DEBUG_LOG(KERNEL, "path=%s, mode=%d attrs=%d", file_path.DebugStr().c_str(), mode, attributes); - Handle handle = Kernel::OpenFileFromArchive(archive_handle, file_path, mode); - if (handle) { - cmd_buff[1] = 0; - cmd_buff[3] = handle; + ResultVal handle = Kernel::OpenFileFromArchive(archive_handle, file_path, mode); + cmd_buff[1] = handle.Code().raw; + if (handle.Succeeded()) { + cmd_buff[3] = *handle; } else { ERROR_LOG(KERNEL, "failed to get a handle for file %s", file_path.DebugStr().c_str()); - // TODO(Link Mauve): check for the actual error values, this one was just chosen arbitrarily. - cmd_buff[1] = -1; } DEBUG_LOG(KERNEL, "called"); @@ -111,27 +107,27 @@ static void OpenFileDirectly(Service::Interface* self) { if (archive_path.GetType() != FileSys::Empty) { ERROR_LOG(KERNEL, "archive LowPath type other than empty is currently unsupported"); - cmd_buff[1] = -1; + cmd_buff[1] = UnimplementedFunction(ErrorModule::FS).raw; return; } // TODO(Link Mauve): Check if we should even get a handle for the archive, and don't leak it - Handle archive_handle = Kernel::OpenArchive(archive_id); - if (!archive_handle) { + // TODO(yuriks): Why is there all this duplicate (and seemingly useless) code up here? + ResultVal archive_handle = Kernel::OpenArchive(archive_id); + cmd_buff[1] = archive_handle.Code().raw; + if (archive_handle.Failed()) { ERROR_LOG(KERNEL, "failed to get a handle for archive"); - // TODO(Link Mauve): Check for the actual error values, this one was just chosen arbitrarily - cmd_buff[1] = -1; return; } + // cmd_buff[2] isn't used according to 3dmoo's implementation. + cmd_buff[3] = *archive_handle; - Handle handle = Kernel::OpenFileFromArchive(archive_handle, file_path, mode); - if (handle) { - cmd_buff[1] = 0; - cmd_buff[3] = handle; + ResultVal handle = Kernel::OpenFileFromArchive(*archive_handle, file_path, mode); + cmd_buff[1] = handle.Code().raw; + if (handle.Succeeded()) { + cmd_buff[3] = *handle; } else { ERROR_LOG(KERNEL, "failed to get a handle for file %s", file_path.DebugStr().c_str()); - // TODO(Link Mauve): check for the actual error values, this one was just chosen arbitrarily. - cmd_buff[1] = -1; } DEBUG_LOG(KERNEL, "called"); @@ -243,14 +239,12 @@ static void OpenDirectory(Service::Interface* self) { DEBUG_LOG(KERNEL, "type=%d size=%d data=%s", dirname_type, dirname_size, dir_path.DebugStr().c_str()); - Handle handle = Kernel::OpenDirectoryFromArchive(archive_handle, dir_path); - if (handle) { - cmd_buff[1] = 0; - cmd_buff[3] = handle; + ResultVal handle = Kernel::OpenDirectoryFromArchive(archive_handle, dir_path); + cmd_buff[1] = handle.Code().raw; + if (handle.Succeeded()) { + cmd_buff[3] = *handle; } else { ERROR_LOG(KERNEL, "failed to get a handle for directory"); - // TODO(Link Mauve): check for the actual error values, this one was just chosen arbitrarily. - cmd_buff[1] = -1; } DEBUG_LOG(KERNEL, "called"); @@ -282,19 +276,17 @@ static void OpenArchive(Service::Interface* self) { if (archive_path.GetType() != FileSys::Empty) { ERROR_LOG(KERNEL, "archive LowPath type other than empty is currently unsupported"); - cmd_buff[1] = -1; + cmd_buff[1] = UnimplementedFunction(ErrorModule::FS).raw; return; } - Handle handle = Kernel::OpenArchive(archive_id); - if (handle) { - cmd_buff[1] = 0; + ResultVal handle = Kernel::OpenArchive(archive_id); + cmd_buff[1] = handle.Code().raw; + if (handle.Succeeded()) { // cmd_buff[2] isn't used according to 3dmoo's implementation. - cmd_buff[3] = handle; + cmd_buff[3] = *handle; } else { ERROR_LOG(KERNEL, "failed to get a handle for archive"); - // TODO(Link Mauve): check for the actual error values, this one was just chosen arbitrarily. - cmd_buff[1] = -1; } DEBUG_LOG(KERNEL, "called"); diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp index 66daded94..de1bd3f61 100644 --- a/src/core/hle/service/gsp_gpu.cpp +++ b/src/core/hle/service/gsp_gpu.cpp @@ -28,28 +28,23 @@ u32 g_thread_id = 1; ///< Thread index into interrupt relay queue, 1 /// Gets a pointer to a thread command buffer in GSP shared memory static inline u8* GetCommandBuffer(u32 thread_id) { - if (0 == g_shared_memory) - return nullptr; - - return Kernel::GetSharedMemoryPointer(g_shared_memory, - 0x800 + (thread_id * sizeof(CommandBuffer))); + ResultVal ptr = Kernel::GetSharedMemoryPointer(g_shared_memory, 0x800 + (thread_id * sizeof(CommandBuffer))); + return ptr.ValueOr(nullptr); } static inline FrameBufferUpdate* GetFrameBufferInfo(u32 thread_id, u32 screen_index) { - if (0 == g_shared_memory) - return nullptr; - _dbg_assert_msg_(GSP, screen_index < 2, "Invalid screen index"); // For each thread there are two FrameBufferUpdate fields u32 offset = 0x200 + (2 * thread_id + screen_index) * sizeof(FrameBufferUpdate); - return (FrameBufferUpdate*)Kernel::GetSharedMemoryPointer(g_shared_memory, offset); + ResultVal ptr = Kernel::GetSharedMemoryPointer(g_shared_memory, offset); + return reinterpret_cast(ptr.ValueOr(nullptr)); } /// Gets a pointer to the interrupt relay queue for a given thread index static inline InterruptRelayQueue* GetInterruptRelayQueue(u32 thread_id) { - return (InterruptRelayQueue*)Kernel::GetSharedMemoryPointer(g_shared_memory, - sizeof(InterruptRelayQueue) * thread_id); + ResultVal ptr = Kernel::GetSharedMemoryPointer(g_shared_memory, sizeof(InterruptRelayQueue) * thread_id); + return reinterpret_cast(ptr.ValueOr(nullptr)); } static void WriteHWRegs(u32 base_address, u32 size_in_bytes, const u32* data) { diff --git a/src/core/hle/service/hid_user.cpp b/src/core/hle/service/hid_user.cpp index 5f6bf1eff..d29de1a52 100644 --- a/src/core/hle/service/hid_user.cpp +++ b/src/core/hle/service/hid_user.cpp @@ -34,10 +34,7 @@ static s16 next_circle_y = 0; * Gets a pointer to the PadData structure inside HID shared memory */ static inline PadData* GetPadData() { - if (0 == shared_mem) - return nullptr; - - return reinterpret_cast(Kernel::GetSharedMemoryPointer(shared_mem, 0)); + return reinterpret_cast(Kernel::GetSharedMemoryPointer(shared_mem, 0).ValueOr(nullptr)); } /** diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index abc8d5edb..fed2268a0 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -62,7 +62,7 @@ void Manager::DeleteService(const std::string& port_name) { /// Get a Service Interface from its Handle Interface* Manager::FetchFromHandle(Handle handle) { - return Kernel::g_object_pool.GetFast(handle); + return Kernel::g_object_pool.Get(handle); } /// Get a Service Interface from its port diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index 55aa84e83..136984b93 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h @@ -80,7 +80,7 @@ public: * @param wait Boolean wait set if current thread should wait as a result of sync operation * @return Result of operation, 0 on success, otherwise error code */ - Result SyncRequest(bool* wait) override { + ResultVal SyncRequest() override { u32* cmd_buff = GetCommandBuffer(); auto itr = m_functions.find(cmd_buff[0]); @@ -91,7 +91,7 @@ public: // TODO(bunnei): Hack - ignore error u32* cmd_buff = Service::GetCommandBuffer(); cmd_buff[1] = 0; - return 0; + return MakeResult(false); } if (itr->second.func == nullptr) { ERROR_LOG(OSHLE, "unimplemented function: port=%s, name=%s", @@ -100,12 +100,12 @@ public: // TODO(bunnei): Hack - ignore error u32* cmd_buff = Service::GetCommandBuffer(); cmd_buff[1] = 0; - return 0; + return MakeResult(false); } itr->second.func(this); - return 0; // TODO: Implement return from actual function + return MakeResult(false); // TODO: Implement return from actual function } /** @@ -113,10 +113,10 @@ public: * @param wait Boolean wait set if current thread should wait as a result of sync operation * @return Result of operation, 0 on success, otherwise error code */ - Result WaitSynchronization(bool* wait) override { + ResultVal WaitSynchronization() override { // TODO(bunnei): ImplementMe ERROR_LOG(OSHLE, "unimplemented function"); - return 0; + return UnimplementedFunction(ErrorModule::OS); } protected: diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp index df38bd93c..0e7fa9e3b 100644 --- a/src/core/hle/service/srv.cpp +++ b/src/core/hle/service/srv.cpp @@ -35,7 +35,7 @@ static void GetProcSemaphore(Service::Interface* self) { } static void GetServiceHandle(Service::Interface* self) { - Result res = 0; + ResultCode res = RESULT_SUCCESS; u32* cmd_buff = Service::GetCommandBuffer(); std::string port_name = std::string((const char*)&cmd_buff[1], 0, Service::kMaxPortSize); @@ -46,9 +46,9 @@ static void GetServiceHandle(Service::Interface* self) { DEBUG_LOG(OSHLE, "called port=%s, handle=0x%08X", port_name.c_str(), cmd_buff[3]); } else { ERROR_LOG(OSHLE, "(UNIMPLEMENTED) called port=%s", port_name.c_str()); - res = -1; + res = UnimplementedFunction(ErrorModule::SRV); } - cmd_buff[1] = res; + cmd_buff[1] = res.raw; } const Interface::FunctionInfo FunctionTable[] = { -- cgit v1.2.3 From 22c86824a4e4fe8953d7104f2fbdf853d3d30c60 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Fri, 31 Oct 2014 21:19:20 -0200 Subject: Remove duplicated docs/update them for changed parameters. --- src/core/hle/kernel/address_arbiter.cpp | 5 ----- src/core/hle/kernel/archive.cpp | 31 ------------------------------- src/core/hle/kernel/event.cpp | 5 ----- src/core/hle/kernel/event.h | 4 ---- src/core/hle/kernel/mutex.cpp | 10 ---------- src/core/hle/kernel/mutex.h | 1 - src/core/hle/kernel/shared_memory.cpp | 16 ---------------- src/core/hle/kernel/shared_memory.h | 1 - src/core/hle/kernel/thread.cpp | 5 ----- src/core/hle/service/service.h | 10 ---------- 10 files changed, 88 deletions(-) (limited to 'src/core/hle/service') diff --git a/src/core/hle/kernel/address_arbiter.cpp b/src/core/hle/kernel/address_arbiter.cpp index 1e697fac1..db571b895 100644 --- a/src/core/hle/kernel/address_arbiter.cpp +++ b/src/core/hle/kernel/address_arbiter.cpp @@ -25,11 +25,6 @@ public: std::string name; ///< Name of address arbiter object (optional) - /** - * Wait for kernel object to synchronize - * @param wait Boolean wait set if current thread should wait as a result of sync operation - * @return Result of operation, 0 on success, otherwise error code - */ ResultVal WaitSynchronization() override { // TODO(bunnei): ImplementMe ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); diff --git a/src/core/hle/kernel/archive.cpp b/src/core/hle/kernel/archive.cpp index e11dddc84..e273444c9 100644 --- a/src/core/hle/kernel/archive.cpp +++ b/src/core/hle/kernel/archive.cpp @@ -52,11 +52,6 @@ public: std::string name; ///< Name of archive (optional) FileSys::Archive* backend; ///< Archive backend interface - /** - * Synchronize kernel object - * @param wait Boolean wait set if current thread should wait as a result of sync operation - * @return Result of operation, 0 on success, otherwise error code - */ ResultVal SyncRequest() override { u32* cmd_buff = Service::GetCommandBuffer(); FileCommand cmd = static_cast(cmd_buff[0]); @@ -114,11 +109,6 @@ public: return MakeResult(false); } - /** - * Wait for kernel object to synchronize - * @param wait Boolean wait set if current thread should wait as a result of sync operation - * @return Result of operation, 0 on success, otherwise error code - */ ResultVal WaitSynchronization() override { // TODO(bunnei): ImplementMe ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); @@ -137,11 +127,6 @@ public: FileSys::Path path; ///< Path of the file std::unique_ptr backend; ///< File backend interface - /** - * Synchronize kernel object - * @param wait Boolean wait set if current thread should wait as a result of sync operation - * @return Result of operation, 0 on success, otherwise error code - */ ResultVal SyncRequest() override { u32* cmd_buff = Service::GetCommandBuffer(); FileCommand cmd = static_cast(cmd_buff[0]); @@ -208,11 +193,6 @@ public: return MakeResult(false); } - /** - * Wait for kernel object to synchronize - * @param wait Boolean wait set if current thread should wait as a result of sync operation - * @return Result of operation, 0 on success, otherwise error code - */ ResultVal WaitSynchronization() override { // TODO(bunnei): ImplementMe ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); @@ -231,11 +211,6 @@ public: FileSys::Path path; ///< Path of the directory std::unique_ptr backend; ///< File backend interface - /** - * Synchronize kernel object - * @param wait Boolean wait set if current thread should wait as a result of sync operation - * @return Result of operation, 0 on success, otherwise error code - */ ResultVal SyncRequest() override { u32* cmd_buff = Service::GetCommandBuffer(); DirectoryCommand cmd = static_cast(cmd_buff[0]); @@ -273,11 +248,6 @@ public: return MakeResult(false); } - /** - * Wait for kernel object to synchronize - * @param wait Boolean wait set if current thread should wait as a result of sync operation - * @return Result of operation, 0 on success, otherwise error code - */ ResultVal WaitSynchronization() override { // TODO(bunnei): ImplementMe ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); @@ -313,7 +283,6 @@ ResultCode CloseArchive(FileSys::Archive::IdCode id_code) { /** * Mounts an archive * @param archive Pointer to the archive to mount - * @return Result of operation */ ResultCode MountArchive(Archive* archive) { FileSys::Archive::IdCode id_code = archive->backend->GetIdCode(); diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cpp index 8a2925a3c..288080209 100644 --- a/src/core/hle/kernel/event.cpp +++ b/src/core/hle/kernel/event.cpp @@ -30,11 +30,6 @@ public: std::vector waiting_threads; ///< Threads that are waiting for the event std::string name; ///< Name of event (optional) - /** - * Wait for kernel object to synchronize - * @param wait Boolean wait set if current thread should wait as a result of sync operation - * @return Result of operation, 0 on success, otherwise error code - */ ResultVal WaitSynchronization() override { bool wait = locked; if (locked) { diff --git a/src/core/hle/kernel/event.h b/src/core/hle/kernel/event.h index 6c17ed232..73aec4e79 100644 --- a/src/core/hle/kernel/event.h +++ b/src/core/hle/kernel/event.h @@ -15,7 +15,6 @@ namespace Kernel { * Changes whether an event is locked or not * @param handle Handle to event to change * @param locked Boolean locked value to set event - * @return Result of operation, 0 on success, otherwise error code */ ResultCode SetEventLocked(const Handle handle, const bool locked); @@ -23,21 +22,18 @@ ResultCode SetEventLocked(const Handle handle, const bool locked); * Hackish function to set an events permanent lock state, used to pass through synch blocks * @param handle Handle to event to change * @param permanent_locked Boolean permanent locked value to set event - * @return Result of operation, 0 on success, otherwise error code */ ResultCode SetPermanentLock(Handle handle, const bool permanent_locked); /** * Signals an event * @param handle Handle to event to signal - * @return Result of operation, 0 on success, otherwise error code */ ResultCode SignalEvent(const Handle handle); /** * Clears an event * @param handle Handle to event to clear - * @return Result of operation, 0 on success, otherwise error code */ ResultCode ClearEvent(Handle handle); diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index e4ff1ef40..b303ba128 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp @@ -27,22 +27,12 @@ public: std::vector waiting_threads; ///< Threads that are waiting for the mutex std::string name; ///< Name of mutex (optional) - /** - * Synchronize kernel object - * @param wait Boolean wait set if current thread should wait as a result of sync operation - * @return Result of operation, 0 on success, otherwise error code - */ ResultVal SyncRequest() override { // TODO(bunnei): ImplementMe locked = true; return MakeResult(false); } - /** - * Wait for kernel object to synchronize - * @param wait Boolean wait set if current thread should wait as a result of sync operation - * @return Result of operation, 0 on success, otherwise error code - */ ResultVal WaitSynchronization() override { // TODO(bunnei): ImplementMe bool wait = locked; diff --git a/src/core/hle/kernel/mutex.h b/src/core/hle/kernel/mutex.h index 233d8c420..155449f95 100644 --- a/src/core/hle/kernel/mutex.h +++ b/src/core/hle/kernel/mutex.h @@ -13,7 +13,6 @@ namespace Kernel { /** * Releases a mutex * @param handle Handle to mutex to release - * @return Result of operation, 0 on success, otherwise error code */ ResultCode ReleaseMutex(Handle handle); diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index b91fc98da..cfcc0e0b7 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp @@ -16,11 +16,6 @@ public: static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::SharedMemory; } Kernel::HandleType GetHandleType() const override { return Kernel::HandleType::SharedMemory; } - /** - * Wait for kernel object to synchronize - * @param wait Boolean wait set if current thread should wait as a result of sync operation - * @return Result of operation, 0 on success, otherwise error code - */ ResultVal WaitSynchronization() override { // TODO(bunnei): ImplementMe ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); @@ -48,11 +43,6 @@ SharedMemory* CreateSharedMemory(Handle& handle, const std::string& name) { return shared_memory; } -/** - * Creates a shared memory object - * @param name Optional name of shared memory object - * @return Handle of newly created shared memory object - */ Handle CreateSharedMemory(const std::string& name) { Handle handle; CreateSharedMemory(handle, name); @@ -86,12 +76,6 @@ ResultCode MapSharedMemory(u32 handle, u32 address, MemoryPermission permissions return RESULT_SUCCESS; } -/** - * Gets a pointer to the shared memory block - * @param handle Shared memory block handle - * @param offset Offset from the start of the shared memory block to get pointer - * @return Pointer to the shared memory block from the specified offset - */ ResultVal GetSharedMemoryPointer(Handle handle, u32 offset) { SharedMemory* shared_memory = Kernel::g_object_pool.Get(handle); if (shared_memory == nullptr) return InvalidHandle(ErrorModule::Kernel); diff --git a/src/core/hle/kernel/shared_memory.h b/src/core/hle/kernel/shared_memory.h index 6ed427088..304cf5b67 100644 --- a/src/core/hle/kernel/shared_memory.h +++ b/src/core/hle/kernel/shared_memory.h @@ -32,7 +32,6 @@ Handle CreateSharedMemory(const std::string& name="Unknown"); * @param address Address in system memory to map shared memory block to * @param permissions Memory block map permissions (specified by SVC field) * @param other_permissions Memory block map other permissions (specified by SVC field) - * @return Result of operation, 0 on success, otherwise error code */ ResultCode MapSharedMemory(Handle handle, u32 address, MemoryPermission permissions, MemoryPermission other_permissions); diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index b01779f2e..2521f883d 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -34,11 +34,6 @@ public: inline bool IsWaiting() const { return (status & THREADSTATUS_WAIT) != 0; } inline bool IsSuspended() const { return (status & THREADSTATUS_SUSPEND) != 0; } - /** - * Wait for kernel object to synchronize - * @param wait Boolean wait set if current thread should wait as a result of sync operation - * @return Result of operation, 0 on success, otherwise error code - */ ResultVal WaitSynchronization() override { if (status != THREADSTATUS_DORMANT) { Handle thread = GetCurrentThreadHandle(); diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index 136984b93..20e7fb4d3 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h @@ -75,11 +75,6 @@ public: m_handles.erase(std::remove(m_handles.begin(), m_handles.end(), handle), m_handles.end()); } - /** - * Synchronize kernel object - * @param wait Boolean wait set if current thread should wait as a result of sync operation - * @return Result of operation, 0 on success, otherwise error code - */ ResultVal SyncRequest() override { u32* cmd_buff = GetCommandBuffer(); auto itr = m_functions.find(cmd_buff[0]); @@ -108,11 +103,6 @@ public: return MakeResult(false); // TODO: Implement return from actual function } - /** - * Wait for kernel object to synchronize - * @param wait Boolean wait set if current thread should wait as a result of sync operation - * @return Result of operation, 0 on success, otherwise error code - */ ResultVal WaitSynchronization() override { // TODO(bunnei): ImplementMe ERROR_LOG(OSHLE, "unimplemented function"); -- cgit v1.2.3