mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 10:53:16 +01:00
Removed all unecessary prints from the mutex test and the kernel
- removed (%d) Sleeping print from contended kernel mutexes. - removed (%d) Waiting print from WAIT_EVENT used by the pager for suspending tasks. - removed prints from the mutex_control syscall and user mutex test.
This commit is contained in:
@@ -263,11 +263,9 @@ int sys_mutex_control(syscall_context_t *regs)
|
||||
|
||||
switch (mutex_op) {
|
||||
case MUTEX_CONTROL_LOCK:
|
||||
printk("(%d): MUTEX_LOCK\n", current->tid);
|
||||
ret = mutex_control_lock(mutex_physical);
|
||||
break;
|
||||
case MUTEX_CONTROL_UNLOCK:
|
||||
printk("(%d): MUTEX_UNLOCK\n", current->tid);
|
||||
ret = mutex_control_unlock(mutex_physical);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -88,7 +88,7 @@ void *__kmalloc(int size)
|
||||
BUG_ON(size >= PAGE_SIZE);
|
||||
BUG_ON(!(cache = mem_cache_init(alloc_page(), PAGE_SIZE,
|
||||
size, 0)));
|
||||
printk("%s: Created new cache for size %d\n", __FUNCTION__, size);
|
||||
// printk("%s: Created new cache for size %d\n", __FUNCTION__, size);
|
||||
list_add(&cache->list, &km_pool.pool_head[index].cache_list);
|
||||
km_pool.pool_head[index].occupied = 1;
|
||||
km_pool.pool_head[index].total_caches++;
|
||||
|
||||
@@ -126,7 +126,7 @@ int mutex_lock(struct mutex *mutex)
|
||||
mutex->wqh.sleepers++;
|
||||
sched_prepare_sleep();
|
||||
spin_unlock(&mutex->wqh.slock);
|
||||
printk("(%d) sleeping...\n", current->tid);
|
||||
// printk("(%d) sleeping...\n", current->tid);
|
||||
schedule();
|
||||
|
||||
/* Did we wake up normally or get interrupted */
|
||||
|
||||
@@ -65,8 +65,8 @@ int wait_on_prepare(struct waitqueue_head *wqh, struct waitqueue *wq)
|
||||
list_add_tail(&wq->task_list, &wqh->task_list);
|
||||
task_set_wqh(current, wqh, wq);
|
||||
sched_prepare_sleep();
|
||||
printk("(%d) waiting on wqh at: 0x%p\n",
|
||||
current->tid, wqh);
|
||||
//printk("(%d) waiting on wqh at: 0x%p\n",
|
||||
// current->tid, wqh);
|
||||
spin_unlock(&wqh->slock);
|
||||
|
||||
return 0;
|
||||
@@ -81,8 +81,8 @@ int wait_on(struct waitqueue_head *wqh)
|
||||
list_add_tail(&wq.task_list, &wqh->task_list);
|
||||
task_set_wqh(current, wqh, &wq);
|
||||
sched_prepare_sleep();
|
||||
printk("(%d) waiting on wqh at: 0x%p\n",
|
||||
current->tid, wqh);
|
||||
//printk("(%d) waiting on wqh at: 0x%p\n",
|
||||
// current->tid, wqh);
|
||||
spin_unlock(&wqh->slock);
|
||||
schedule();
|
||||
|
||||
@@ -95,7 +95,7 @@ int wait_on(struct waitqueue_head *wqh)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Wake up all */
|
||||
/* Wake up all - FIXME: this is buggy with double spin_unlock */
|
||||
void wake_up_all(struct waitqueue_head *wqh, unsigned int flags)
|
||||
{
|
||||
BUG_ON(wqh->sleepers < 0);
|
||||
@@ -111,7 +111,7 @@ void wake_up_all(struct waitqueue_head *wqh, unsigned int flags)
|
||||
wqh->sleepers--;
|
||||
if (flags & WAKEUP_INTERRUPT)
|
||||
sleeper->flags |= TASK_INTERRUPTED;
|
||||
printk("(%d) Waking up (%d)\n", current->tid, sleeper->tid);
|
||||
// printk("(%d) Waking up (%d)\n", current->tid, sleeper->tid);
|
||||
spin_unlock(&wqh->slock);
|
||||
|
||||
if (flags & WAKEUP_SYNC)
|
||||
@@ -138,7 +138,7 @@ void wake_up(struct waitqueue_head *wqh, unsigned int flags)
|
||||
task_unset_wqh(sleeper);
|
||||
if (flags & WAKEUP_INTERRUPT)
|
||||
sleeper->flags |= TASK_INTERRUPTED;
|
||||
printk("(%d) Waking up (%d)\n", current->tid, sleeper->tid);
|
||||
// printk("(%d) Waking up (%d)\n", current->tid, sleeper->tid);
|
||||
spin_unlock(&wqh->slock);
|
||||
|
||||
if (flags & WAKEUP_SYNC)
|
||||
|
||||
Reference in New Issue
Block a user