summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2014-12-05 23:53:49 -0200
committerGravatar Yuri Kunde Schlesner2014-12-13 02:08:02 -0200
commit0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9 (patch)
tree40fee084c551bfb497e68181447298f862ea68ca /src/core/hle/kernel/thread.cpp
parentImplement text path trimming for shorter paths. (diff)
downloadyuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.tar.gz
yuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.tar.xz
yuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.zip
Convert old logging calls to new logging macros
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 492b917e1..1c04701de 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -150,13 +150,13 @@ void ChangeReadyState(Thread* t, bool ready) {
150 150
151/// Verify that a thread has not been released from waiting 151/// Verify that a thread has not been released from waiting
152static bool VerifyWait(const Thread* thread, WaitType type, Handle wait_handle) { 152static bool VerifyWait(const Thread* thread, WaitType type, Handle wait_handle) {
153 _dbg_assert_(KERNEL, thread != nullptr); 153 _dbg_assert_(Kernel, thread != nullptr);
154 return (type == thread->wait_type) && (wait_handle == thread->wait_handle) && (thread->IsWaiting()); 154 return (type == thread->wait_type) && (wait_handle == thread->wait_handle) && (thread->IsWaiting());
155} 155}
156 156
157/// Verify that a thread has not been released from waiting (with wait address) 157/// Verify that a thread has not been released from waiting (with wait address)
158static bool VerifyWait(const Thread* thread, WaitType type, Handle wait_handle, VAddr wait_address) { 158static bool VerifyWait(const Thread* thread, WaitType type, Handle wait_handle, VAddr wait_address) {
159 _dbg_assert_(KERNEL, thread != nullptr); 159 _dbg_assert_(Kernel, thread != nullptr);
160 return VerifyWait(thread, type, wait_handle) && (wait_address == thread->wait_address); 160 return VerifyWait(thread, type, wait_handle) && (wait_address == thread->wait_address);
161} 161}
162 162
@@ -196,7 +196,7 @@ void ChangeThreadState(Thread* t, ThreadStatus new_status) {
196 196
197 if (new_status == THREADSTATUS_WAIT) { 197 if (new_status == THREADSTATUS_WAIT) {
198 if (t->wait_type == WAITTYPE_NONE) { 198 if (t->wait_type == WAITTYPE_NONE) {
199 ERROR_LOG(KERNEL, "Waittype none not allowed"); 199 LOG_ERROR(Kernel, "Waittype none not allowed");
200 } 200 }
201 } 201 }
202} 202}
@@ -318,12 +318,12 @@ void DebugThreadQueue() {
318 if (!thread) { 318 if (!thread) {
319 return; 319 return;
320 } 320 }
321 INFO_LOG(KERNEL, "0x%02X 0x%08X (current)", thread->current_priority, GetCurrentThreadHandle()); 321 LOG_DEBUG(Kernel, "0x%02X 0x%08X (current)", thread->current_priority, GetCurrentThreadHandle());
322 for (u32 i = 0; i < thread_queue.size(); i++) { 322 for (u32 i = 0; i < thread_queue.size(); i++) {
323 Handle handle = thread_queue[i]; 323 Handle handle = thread_queue[i];
324 s32 priority = thread_ready_queue.contains(handle); 324 s32 priority = thread_ready_queue.contains(handle);
325 if (priority != -1) { 325 if (priority != -1) {
326 INFO_LOG(KERNEL, "0x%02X 0x%08X", priority, handle); 326 LOG_DEBUG(Kernel, "0x%02X 0x%08X", priority, handle);
327 } 327 }
328 } 328 }
329} 329}
@@ -333,7 +333,7 @@ Thread* CreateThread(Handle& handle, const char* name, u32 entry_point, s32 prio
333 s32 processor_id, u32 stack_top, int stack_size) { 333 s32 processor_id, u32 stack_top, int stack_size) {
334 334
335 _assert_msg_(KERNEL, (priority >= THREADPRIO_HIGHEST && priority <= THREADPRIO_LOWEST), 335 _assert_msg_(KERNEL, (priority >= THREADPRIO_HIGHEST && priority <= THREADPRIO_LOWEST),
336 "CreateThread priority=%d, outside of allowable range!", priority) 336 "priority=%d, outside of allowable range!", priority)
337 337
338 Thread* thread = new Thread; 338 Thread* thread = new Thread;
339 339
@@ -362,24 +362,24 @@ Handle CreateThread(const char* name, u32 entry_point, s32 priority, u32 arg, s3
362 u32 stack_top, int stack_size) { 362 u32 stack_top, int stack_size) {
363 363
364 if (name == nullptr) { 364 if (name == nullptr) {
365 ERROR_LOG(KERNEL, "CreateThread(): nullptr name"); 365 LOG_ERROR(Kernel_SVC, "nullptr name");
366 return -1; 366 return -1;
367 } 367 }
368 if ((u32)stack_size < 0x200) { 368 if ((u32)stack_size < 0x200) {
369 ERROR_LOG(KERNEL, "CreateThread(name=%s): invalid stack_size=0x%08X", name, 369 LOG_ERROR(Kernel_SVC, "(name=%s): invalid stack_size=0x%08X", name,
370 stack_size); 370 stack_size);
371 return -1; 371 return -1;
372 } 372 }
373 if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) { 373 if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) {
374 s32 new_priority = CLAMP(priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST); 374 s32 new_priority = CLAMP(priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST);
375 WARN_LOG(KERNEL, "CreateThread(name=%s): invalid priority=0x%08X, clamping to %08X", 375 LOG_WARNING(Kernel_SVC, "(name=%s): invalid priority=%d, clamping to %d",
376 name, priority, new_priority); 376 name, priority, new_priority);
377 // TODO(bunnei): Clamping to a valid priority is not necessarily correct behavior... Confirm 377 // TODO(bunnei): Clamping to a valid priority is not necessarily correct behavior... Confirm
378 // validity of this 378 // validity of this
379 priority = new_priority; 379 priority = new_priority;
380 } 380 }
381 if (!Memory::GetPointer(entry_point)) { 381 if (!Memory::GetPointer(entry_point)) {
382 ERROR_LOG(KERNEL, "CreateThread(name=%s): invalid entry %08x", name, entry_point); 382 LOG_ERROR(Kernel_SVC, "(name=%s): invalid entry %08x", name, entry_point);
383 return -1; 383 return -1;
384 } 384 }
385 Handle handle; 385 Handle handle;
@@ -416,7 +416,7 @@ ResultCode SetThreadPriority(Handle handle, s32 priority) {
416 // If priority is invalid, clamp to valid range 416 // If priority is invalid, clamp to valid range
417 if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) { 417 if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) {
418 s32 new_priority = CLAMP(priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST); 418 s32 new_priority = CLAMP(priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST);
419 WARN_LOG(KERNEL, "invalid priority=0x%08X, clamping to %08X", priority, new_priority); 419 LOG_WARNING(Kernel_SVC, "invalid priority=%d, clamping to %d", priority, new_priority);
420 // TODO(bunnei): Clamping to a valid priority is not necessarily correct behavior... Confirm 420 // TODO(bunnei): Clamping to a valid priority is not necessarily correct behavior... Confirm
421 // validity of this 421 // validity of this
422 priority = new_priority; 422 priority = new_priority;
@@ -470,7 +470,7 @@ void Reschedule() {
470 Thread* next = NextThread(); 470 Thread* next = NextThread();
471 HLE::g_reschedule = false; 471 HLE::g_reschedule = false;
472 if (next > 0) { 472 if (next > 0) {
473 INFO_LOG(KERNEL, "context switch 0x%08X -> 0x%08X", prev->GetHandle(), next->GetHandle()); 473 LOG_TRACE(Kernel, "context switch 0x%08X -> 0x%08X", prev->GetHandle(), next->GetHandle());
474 474
475 SwitchContext(next); 475 SwitchContext(next);
476 476