Removed unnecessary printks, fixed few minor issues.

This commit is contained in:
Bahadir Balban
2008-02-09 15:48:10 +00:00
parent cd170c1b7c
commit 57420942ba
12 changed files with 42 additions and 36 deletions

View File

@@ -46,8 +46,15 @@ int sys_ipc_control(struct syscall_args *regs)
int ipc_send(l4id_t recv_tid)
{
struct ktcb *receiver = find_task(recv_tid);
struct waitqueue_head *wqhs = &receiver->wqh_send;
struct waitqueue_head *wqhr = &receiver->wqh_recv;
struct waitqueue_head *wqhs, *wqhr;
if (!receiver) {
printk("%s: tid: %d, no such task.\n", __FUNCTION__,
recv_tid);
return -EINVAL;
}
wqhs = &receiver->wqh_send;
wqhr = &receiver->wqh_recv;
spin_lock(&wqhs->slock);
spin_lock(&wqhr->slock);

View File

@@ -83,29 +83,19 @@ int thread_create(struct task_ids *ids)
copy_pgd_kern_all(new->pgd);
/* Get new space id */
if (ids->spid == TASK_ID_INVALID) {
if (ids->spid == TASK_ID_INVALID)
ids->spid = id_new(space_id_pool);
printk("Got new space id: %d\n", ids->spid);
} else {
printk("Try new space id: %d\n", ids->spid);
else
if ((ids->spid = id_get(space_id_pool, ids->spid)) < 0)
ids->spid = id_new(space_id_pool);
else
printk("Success.\n");
}
spc_found:
/* Get a new thread id */
if (ids->tid == TASK_ID_INVALID) {
if (ids->tid == TASK_ID_INVALID)
ids->tid = id_new(thread_id_pool);
printk("Got new thread id: %d\n", ids->tid);
} else {
printk("Try new thread id: %d\n", ids->tid);
else
if ((ids->tid = id_get(thread_id_pool, ids->tid)) < 0)
ids->tid = id_new(thread_id_pool);
else
printk("Success.\n");
}
/* Set all ids */
set_task_ids(new, ids);