+void Threads_int_DumpThread(tThread *thread)
+{
+ Log(" %p %i (%i) - %s (CPU %i) - %i (%s)",
+ thread, thread->TID, thread->Process->PID, thread->ThreadName, thread->CurCPU,
+ thread->Status, casTHREAD_STAT[thread->Status]
+ );
+ switch(thread->Status)
+ {
+ case THREAD_STAT_MUTEXSLEEP:
+ Log(" Mutex Pointer: %p", thread->WaitPointer);
+ break;
+ case THREAD_STAT_SEMAPHORESLEEP:
+ Log(" Semaphore Pointer: %p", thread->WaitPointer);
+ Log(" Semaphore Name: %s:%s",
+ ((tSemaphore*)thread->WaitPointer)->ModName,
+ ((tSemaphore*)thread->WaitPointer)->Name
+ );
+ break;
+ case THREAD_STAT_ZOMBIE:
+ Log(" Return Status: %i", thread->RetStatus);
+ break;
+ default: break;
+ }
+ Log(" Priority %i, Quantum %i", thread->Priority, thread->Quantum);
+ Log(" KStack 0x%x", thread->KernelStack);
+ if( thread->bInstrTrace )
+ Log(" Tracing Enabled");
+ Proc_DumpThreadCPUState(thread);
+}
+