From: John Hodge Date: Sun, 27 Sep 2009 05:40:56 +0000 (+0800) Subject: Added debug to Threads_GetNext X-Git-Tag: rel0.06~464 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=eb106b6fa9ebd3710f667b88bcc0924dc0eef099;p=tpg%2Facess2.git Added debug to Threads_GetNext --- diff --git a/Kernel/arch/x86/proc.c b/Kernel/arch/x86/proc.c index f04793a2..fd916438 100644 --- a/Kernel/arch/x86/proc.c +++ b/Kernel/arch/x86/proc.c @@ -11,7 +11,7 @@ #endif // === FLAGS === -#define DEBUG_TRACE_SWITCH 1 +#define DEBUG_TRACE_SWITCH 0 // === CONSTANTS === #define SWITCH_MAGIC 0xFFFACE55 // There is no code in this area diff --git a/Kernel/threads.c b/Kernel/threads.c index da65596b..bb0ec73a 100644 --- a/Kernel/threads.c +++ b/Kernel/threads.c @@ -535,6 +535,8 @@ tThread *Threads_GetNextToRun(int CPU) return gActiveThreads; } + Log("giNumActiveThreads=%i,giTotalTickets=%i", + giNumActiveThreads, giTotalTickets); // Get the ticket number ticket = number = rand() % giTotalTickets;