+tThread *Proc_GetCurThread(void)
+{
+ return gpCurrentThread;
+}
+
+void Threads_Dump(void)
+{
+ tThread *thread;
+ for( thread = gpThreads; thread; thread = thread->GlobalNext )
+ {
+ Log_Log("Threads", "TID %i (%s), PID %i",
+ thread->TID, thread->ThreadName, thread->PID);
+ Log_Log("Threads", "User: %i, Group: %i",
+ thread->UID, thread->GID);
+ Log_Log("Threads", "Kernel Thread ID: %i",
+ thread->KernelTID);
+ }
+}
+
+void Threads_SetThread(int TID)
+{
+ tThread *thread;
+ for( thread = gpThreads; thread; thread = thread->GlobalNext )
+ {
+ if( thread->TID == TID ) {
+ gpCurrentThread = thread;
+ return ;
+ }
+ }
+ Log_Error("Threads", "_SetThread - Thread %i is not on global list", TID);
+}
+