summaryrefslogtreecommitdiff
path: root/src/core/hle/svc.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2014-06-06 00:19:40 -0400
committerGravatar bunnei2014-06-13 09:51:11 -0400
commitd7363322c79d6e7598e0d80cf1af9c05b652cecb (patch)
tree162a31d1cda9cada208f3732a7f76317d891a0f2 /src/core/hle/svc.cpp
parentMutex: Moved ReleaseMutex iterator declaration to be inside while loop. (diff)
downloadyuzu-d7363322c79d6e7598e0d80cf1af9c05b652cecb.tar.gz
yuzu-d7363322c79d6e7598e0d80cf1af9c05b652cecb.tar.xz
yuzu-d7363322c79d6e7598e0d80cf1af9c05b652cecb.zip
HLE: Updated various handle debug assertions to be more clear.
Diffstat (limited to 'src/core/hle/svc.cpp')
-rw-r--r--src/core/hle/svc.cpp12
1 files changed, 6 insertions, 6 deletions
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}