Print currently running threads as well for debugging.

This commit is contained in:
Ali Mashtizadeh 2023-08-30 15:50:41 -04:00
parent 3796627962
commit 8ce9e523e0

View File

@ -315,6 +315,13 @@ Debug_Threads(int argc, const char *argv[])
//Spinlock_Lock(&threadLock);
for (int i = 0; i < MAX_CPUS; i++) {
thr = curProc[i];
if (thr) {
kprintf("Running Thread CPU %d: %d(%016llx) %d\n", i, thr->tid, thr, thr->ctxSwitches);
Thread_Dump(thr);
}
}
TAILQ_FOREACH(thr, &runnableQueue, schedQueue)
{
kprintf("Runnable Thread: %d(%016llx) %d\n", thr->tid, thr, thr->ctxSwitches);