Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

Kernel: Made SyncRequest not pure virtual, with a default implementation of error (as this is not required for all kernel objects)

bunneiaae9fcf4a407
diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cpp
index 787e9f5fd0..36c7dcbc8c 100644
--- a/src/core/hle/kernel/event.cpp
+++ b/src/core/hle/kernel/event.cpp
@@ -30,17 +30,6 @@ public:
std::vector<Handle> waiting_threads; ///< Threads that are waiting for the event
std::string name; ///< Name of event (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
- */
- Result SyncRequest(bool* wait) {
- // TODO(bunnei): ImplementMe
- ERROR_LOG(KERNEL, "(UMIMPLEMENTED) call");
- return 0;
- }
-
/**
* Wait for kernel object to synchronize
* @param wait Boolean wait set if current thread should wait as a result of sync operation
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index c26071276e..f1bb78801d 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -53,7 +53,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
*/
- virtual Result SyncRequest(bool* wait) = 0;
+ virtual Result SyncRequest(bool* wait) {
+ ERROR_LOG(KERNEL, "(UNIMPLEMENTED)");
+ return -1;
+ }
/**
* Wait for kernel object to synchronize
@@ -61,7 +64,6 @@ public:
* @return Result of operation, 0 on success, otherwise error code
*/
virtual Result WaitSynchronization(bool* wait) = 0;
-
};
class ObjectPool : NonCopyable {
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index d372df7094..180c149280 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -37,16 +37,6 @@ public:
inline bool IsWaiting() const { return (status & THREADSTATUS_WAIT) != 0; }
inline bool IsSuspended() const { return (status & THREADSTATUS_SUSPEND) != 0; }
- /**
- * 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
- */
- Result SyncRequest(bool* wait) {
- // TODO(bunnei): ImplementMe
- return 0;
- }
-
/**
* Wait for kernel object to synchronize
* @param wait Boolean wait set if current thread should wait as a result of sync operation