From 359d55f53cd5d2c8b5f8ab71f0674159ecc1d388 Mon Sep 17 00:00:00 2001 From: Ali Mashtizadeh Date: Thu, 22 Jan 2015 15:11:12 -0800 Subject: [PATCH] Removing excess logging and improve semaphore debugging --- sys/kern/semaphore.c | 4 ++++ sys/kern/thread.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/kern/semaphore.c b/sys/kern/semaphore.c index b1e5314..ff2c5dd 100644 --- a/sys/kern/semaphore.c +++ b/sys/kern/semaphore.c @@ -102,7 +102,11 @@ Debug_Semaphores(int argc, const char *argv[]) kprintf("%-36s Count\n", "Lock Name"); LIST_FOREACH(sema, &semaList, semaphoreList) { + Thread *thr; kprintf("%-36s %8d\n", sema->name, sema->count); + TAILQ_FOREACH(thr, &sema->waiters, semaQueue) { + kprintf("waiting: %d:%d\n", thr->proc->pid, thr->tid); + } } Spinlock_Unlock(&semaListLock); diff --git a/sys/kern/thread.c b/sys/kern/thread.c index a6b02f2..b1a665c 100644 --- a/sys/kern/thread.c +++ b/sys/kern/thread.c @@ -206,7 +206,6 @@ Process_Wait(Process *proc, uint64_t pid) // Release threads TAILQ_FOREACH_SAFE(thr, &p->zombieQueue, schedQueue, thr_temp) { - Thread_Dump(thr); Thread_Release(thr); }