summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/mutex.cpp2
-rw-r--r--src/core/hle/kernel/thread.cpp4
-rw-r--r--src/core/hle/service/gsp.cpp2
-rw-r--r--src/core/hle/svc.cpp12
4 files changed, 10 insertions, 10 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp
index eee7c4935..ee7507edf 100644
--- a/src/core/hle/kernel/mutex.cpp
+++ b/src/core/hle/kernel/mutex.cpp
@@ -122,7 +122,7 @@ bool ReleaseMutex(Mutex* mutex) {
122Result ReleaseMutex(Handle handle) { 122Result ReleaseMutex(Handle handle) {
123 Mutex* mutex = Kernel::g_object_pool.GetFast<Mutex>(handle); 123 Mutex* mutex = Kernel::g_object_pool.GetFast<Mutex>(handle);
124 124
125 _assert_msg_(KERNEL, mutex, "ReleaseMutex tried to release a NULL mutex!"); 125 _assert_msg_(KERNEL, (mutex != NULL), "ReleaseMutex tried to release a NULL mutex!");
126 126
127 if (!ReleaseMutex(mutex)) { 127 if (!ReleaseMutex(mutex)) {
128 return -1; 128 return -1;
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index da93e006c..5fdb4fbe6 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -353,7 +353,7 @@ Handle CreateThread(const char* name, u32 entry_point, s32 priority, u32 arg, s3
353/// Get the priority of the thread specified by handle 353/// Get the priority of the thread specified by handle
354u32 GetThreadPriority(const Handle handle) { 354u32 GetThreadPriority(const Handle handle) {
355 Thread* thread = g_object_pool.GetFast<Thread>(handle); 355 Thread* thread = g_object_pool.GetFast<Thread>(handle);
356 _assert_msg_(KERNEL, thread, "called, but thread is NULL!"); 356 _assert_msg_(KERNEL, (thread != NULL), "called, but thread is NULL!");
357 return thread->current_priority; 357 return thread->current_priority;
358} 358}
359 359
@@ -365,7 +365,7 @@ Result SetThreadPriority(Handle handle, s32 priority) {
365 } else { 365 } else {
366 thread = g_object_pool.GetFast<Thread>(handle); 366 thread = g_object_pool.GetFast<Thread>(handle);
367 } 367 }
368 _assert_msg_(KERNEL, thread, "called, but thread is NULL!"); 368 _assert_msg_(KERNEL, (thread != NULL), "called, but thread is NULL!");
369 369
370 // If priority is invalid, clamp to valid range 370 // If priority is invalid, clamp to valid range
371 if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) { 371 if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) {
diff --git a/src/core/hle/service/gsp.cpp b/src/core/hle/service/gsp.cpp
index 2635a2eb8..c181e296f 100644
--- a/src/core/hle/service/gsp.cpp
+++ b/src/core/hle/service/gsp.cpp
@@ -104,7 +104,7 @@ void RegisterInterruptRelayQueue(Service::Interface* self) {
104 u32 flags = cmd_buff[1]; 104 u32 flags = cmd_buff[1];
105 u32 event_handle = cmd_buff[3]; 105 u32 event_handle = cmd_buff[3];
106 106
107 _assert_msg_(GSP, event_handle, "called, but event is NULL!"); 107 _assert_msg_(GSP, (event_handle != 0), "called, but event is NULL!");
108 108
109 g_event_handle = event_handle; 109 g_event_handle = event_handle;
110 110
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index 0ce831103..c389bbaac 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -81,7 +81,7 @@ Result ConnectToPort(void* _out, const char* port_name) {
81 Service::Interface* service = Service::g_manager->FetchFromPortName(port_name); 81 Service::Interface* service = Service::g_manager->FetchFromPortName(port_name);
82 82
83 DEBUG_LOG(SVC, "called port_name=%s", port_name); 83 DEBUG_LOG(SVC, "called port_name=%s", port_name);
84 _assert_msg_(KERNEL, service, "called, but service is not implemented!"); 84 _assert_msg_(KERNEL, (service != NULL), "called, but service is not implemented!");
85 85
86 *out = service->GetHandle(); 86 *out = service->GetHandle();
87 87
@@ -93,7 +93,7 @@ Result SendSyncRequest(Handle handle) {
93 bool wait = false; 93 bool wait = false;
94 Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); 94 Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle);
95 95
96 _assert_msg_(KERNEL, object, "called, but kernel object is NULL!"); 96 _assert_msg_(KERNEL, (object != NULL), "called, but kernel object is NULL!");
97 DEBUG_LOG(SVC, "called handle=0x%08X(%s)", handle, object->GetTypeName()); 97 DEBUG_LOG(SVC, "called handle=0x%08X(%s)", handle, object->GetTypeName());
98 98
99 Result res = object->SyncRequest(&wait); 99 Result res = object->SyncRequest(&wait);
@@ -122,7 +122,7 @@ Result WaitSynchronization1(Handle handle, s64 nano_seconds) {
122 DEBUG_LOG(SVC, "called handle=0x%08X(%s:%s), nanoseconds=%d", handle, object->GetTypeName(), 122 DEBUG_LOG(SVC, "called handle=0x%08X(%s:%s), nanoseconds=%d", handle, object->GetTypeName(),
123 object->GetName(), nano_seconds); 123 object->GetName(), nano_seconds);
124 124
125 _assert_msg_(KERNEL, object, "called, but kernel object is NULL!"); 125 _assert_msg_(KERNEL, (object != NULL), "called, but kernel object is NULL!");
126 126
127 Result res = object->WaitSynchronization(&wait); 127 Result res = object->WaitSynchronization(&wait);
128 128
@@ -150,9 +150,9 @@ Result WaitSynchronizationN(void* _out, void* _handles, u32 handle_count, u32 wa
150 // Iterate through each handle, synchronize kernel object 150 // Iterate through each handle, synchronize kernel object
151 for (u32 i = 0; i < handle_count; i++) { 151 for (u32 i = 0; i < handle_count; i++) {
152 bool wait = false; 152 bool wait = false;
153 Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handles[i]); // 0 handle 153 Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handles[i]);
154 154
155 _assert_msg_(KERNEL, object, "called handle=0x%08X, but kernel object " 155 _assert_msg_(KERNEL, (object != NULL), "called handle=0x%08X, but kernel object "
156 "is NULL!", handles[i]); 156 "is NULL!", handles[i]);
157 157
158 DEBUG_LOG(SVC, "\thandle[%d] = 0x%08X(%s:%s)", i, handles[i], object->GetTypeName(), 158 DEBUG_LOG(SVC, "\thandle[%d] = 0x%08X(%s:%s)", i, handles[i], object->GetTypeName(),
@@ -278,7 +278,7 @@ Result CreateMutex(void* _mutex, u32 initial_locked) {
278/// Release a mutex 278/// Release a mutex
279Result ReleaseMutex(Handle handle) { 279Result ReleaseMutex(Handle handle) {
280 DEBUG_LOG(SVC, "called handle=0x%08X", handle); 280 DEBUG_LOG(SVC, "called handle=0x%08X", handle);
281 _assert_msg_(KERNEL, handle, "called, but handle is NULL!"); 281 _assert_msg_(KERNEL, (handle != 0), "called, but handle is NULL!");
282 Kernel::ReleaseMutex(handle); 282 Kernel::ReleaseMutex(handle);
283 return 0; 283 return 0;
284} 284}