X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fthreads.c;h=f586f68a226bf9ccce84f75a9cc6388849684d79;hb=7b02384163a5b84698bb3311e869250c4717fac9;hp=a81736b19bcfdee96eb17a8ce1b9fcec9f7010e4;hpb=f086aa018b58f23bc15fbee7b2c648e35bb7dc1c;p=tpg%2Facess2.git diff --git a/Kernel/threads.c b/Kernel/threads.c index a81736b1..f586f68a 100644 --- a/Kernel/threads.c +++ b/Kernel/threads.c @@ -124,6 +124,7 @@ void Threads_Init(void) Log_Debug("Threads", "Offsets of tThread"); Log_Debug("Threads", ".Priority = %i", offsetof(tThread, Priority)); + Log_Debug("Threads", ".KernelStack = %i", offsetof(tThread, KernelStack)); // Create Initial Task #if SCHEDULER_TYPE == SCHED_RR_PRI @@ -999,7 +1000,7 @@ void Threads_SegFault(tVAddr Addr) tThread *cur = Proc_GetCurThread(); cur->bInstrTrace = 0; Log_Warning("Threads", "Thread #%i committed a segfault at address %p", cur->TID, Addr); - MM_DumpTables(0, KERNEL_BASE); + MM_DumpTables(0, USER_MAX); Threads_Fault( 1 ); //Threads_Exit( 0, -1 ); } @@ -1292,7 +1293,7 @@ tThread *Threads_GetNextToRun(int CPU, tThread *Last) } // If we fall onto the same queue again, special handling is // needed - if( Last && i == Last->Priority ) { + if( Last && Last->Status == THREAD_STAT_ACTIVE && i == Last->Priority ) { tThread *savedThread = thread; // Find the next unscheduled thread in the list