X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Facesskernel_src%2Fthreads.c;h=3465992630f9491a9af8deb594103a15dec60132;hb=717454930aa0e255517c68c837927deac49bd78e;hp=9d125178e4b7e21915668881d36c49bdc1dfd641;hpb=7f80ab30017689efe0aaaab18abc7ceda689d859;p=tpg%2Facess2.git diff --git a/AcessNative/acesskernel_src/threads.c b/AcessNative/acesskernel_src/threads.c index 9d125178..34659926 100644 --- a/AcessNative/acesskernel_src/threads.c +++ b/AcessNative/acesskernel_src/threads.c @@ -92,6 +92,19 @@ void Threads_Dump(void) } } +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); +} + tThread *Threads_GetThread(int TID) { tThread *thread; @@ -156,6 +169,8 @@ int Threads_SetGID(int *Errno, tGID NewGID) Uint *Threads_GetCfgPtr(int Index) { +// Log_Debug("Threads", "Index=%i, gpCurrentThread=%p", +// Index, gpCurrentThread); if( Index < 0 || Index >= NUM_CFG_ENTRIES ) return NULL; if( !gpCurrentThread )