diff --git a/src/api/ipc.c b/src/api/ipc.c index 0ab9338..849c755 100644 --- a/src/api/ipc.c +++ b/src/api/ipc.c @@ -85,8 +85,8 @@ int ipc_send(l4id_t recv_tid) /* Do the work */ ipc_msg_copy(sleeper, current); - printk("%s: (%d) Waking up (%d)\n", __FUNCTION__, - current->tid, sleeper->tid); + //printk("%s: (%d) Waking up (%d)\n", __FUNCTION__, + // current->tid, sleeper->tid); /* Wake it up, we can yield here. */ sched_resume_task(sleeper); @@ -100,7 +100,7 @@ int ipc_send(l4id_t recv_tid) list_add_tail(&wq.task_list, &wqhs->task_list); sched_notify_sleep(current); need_resched = 1; - printk("%s: (%d) waiting for (%d)\n", __FUNCTION__, current->tid, recv_tid); + // printk("%s: (%d) waiting for (%d)\n", __FUNCTION__, current->tid, recv_tid); spin_unlock(&wqhr->slock); spin_unlock(&wqhs->slock); return 0; @@ -133,8 +133,8 @@ int ipc_recv(l4id_t senderid) /* Do the work */ ipc_msg_copy(current, sleeper); - printk("%s: (%d) Waking up (%d)\n", __FUNCTION__, - current->tid, sleeper->tid); + // printk("%s: (%d) Waking up (%d)\n", __FUNCTION__, + // current->tid, sleeper->tid); /* Wake it up */ sched_resume_task(sleeper); @@ -149,7 +149,7 @@ int ipc_recv(l4id_t senderid) list_add_tail(&wq.task_list, &wqhr->task_list); sched_notify_sleep(current); need_resched = 1; - printk("%s: (%d) waiting for (%d) \n", __FUNCTION__, current->tid, current->senderid); + // printk("%s: (%d) waiting for (%d) \n", __FUNCTION__, current->tid, current->senderid); spin_unlock(&wqhr->slock); spin_unlock(&wqhs->slock); return 0; diff --git a/tasks/fs0/src/syscalls.c b/tasks/fs0/src/syscalls.c index 3867f3d..fc1eaaf 100644 --- a/tasks/fs0/src/syscalls.c +++ b/tasks/fs0/src/syscalls.c @@ -30,7 +30,7 @@ int pager_sys_open(l4id_t sender, int fd, unsigned long vnum, unsigned long size { int err; - printf("%s/%s\n", __TASKNAME__, __FUNCTION__); + // printf("%s/%s\n", __TASKNAME__, __FUNCTION__); l4_save_ipcregs(); @@ -106,11 +106,10 @@ int pager_sys_close(l4id_t sender, l4id_t closer, int fd) struct tcb *task; int err; - printf("%s/%s\n", __TASKNAME__, __FUNCTION__); + // printf("%s/%s\n", __TASKNAME__, __FUNCTION__); BUG_ON(!(task = find_task(closer))); - printf("Deleting fd: %d\n", fd); if ((err = id_del(task->fdpool, fd)) < 0) { printf("%s: Error releasing fd identifier.\n", __FUNCTION__); @@ -136,7 +135,8 @@ int sys_open(l4id_t sender, const char *pathname, int flags, unsigned int mode) int fd; int retval, err; - printf("%s/%s\n", __TASKNAME__, __FUNCTION__); + // printf("%s/%s\n", __TASKNAME__, __FUNCTION__); + /* Get the task */ BUG_ON(!(task = find_task(sender))); @@ -342,7 +342,8 @@ int pager_sys_read(l4id_t sender, unsigned long vnum, unsigned long f_offset, struct vnode *v; int err, retval = 0; - printf("%s/%s\n", __TASKNAME__, __FUNCTION__); + // printf("%s/%s\n", __TASKNAME__, __FUNCTION__); + if (sender != PAGER_TID) { retval = -EINVAL; goto out; @@ -376,7 +377,8 @@ int pager_update_stats(l4id_t sender, unsigned long vnum, struct vnode *v; int retval = 0; - printf("%s/%s\n", __TASKNAME__, __FUNCTION__); + // printf("%s/%s\n", __TASKNAME__, __FUNCTION__); + if (sender != PAGER_TID) { retval = -EINVAL; goto out; @@ -409,7 +411,8 @@ int pager_sys_write(l4id_t sender, unsigned long vnum, unsigned long f_offset, struct vnode *v; int err, retval = 0; - printf("%s/%s\n", __TASKNAME__, __FUNCTION__); + // printf("%s/%s\n", __TASKNAME__, __FUNCTION__); + if (sender != PAGER_TID) { retval = -EINVAL; goto out; @@ -441,9 +444,9 @@ int pager_sys_write(l4id_t sender, unsigned long vnum, unsigned long f_offset, } out: - printf("%s/%s: Returning ipc result.\n", __TASKNAME__, __FUNCTION__); + // printf("%s/%s: Returning ipc result.\n", __TASKNAME__, __FUNCTION__); l4_ipc_return(retval); - printf("%s/%s: Done.\n", __TASKNAME__, __FUNCTION__); + // printf("%s/%s: Done.\n", __TASKNAME__, __FUNCTION__); return 0; } diff --git a/tasks/mm0/src/file.c b/tasks/mm0/src/file.c index e15d493..9b771fa 100644 --- a/tasks/mm0/src/file.c +++ b/tasks/mm0/src/file.c @@ -246,7 +246,7 @@ int vfs_close(l4id_t sender, int fd) { int err; - printf("%s/%s Sending to %d\n", __TASKNAME__, __FUNCTION__, VFS_TID); + // printf("%s/%s Sending to %d\n", __TASKNAME__, __FUNCTION__, VFS_TID); l4_save_ipcregs(); write_mr(L4SYS_ARG0, sender); @@ -256,7 +256,7 @@ int vfs_close(l4id_t sender, int fd) printf("%s: L4 IPC Error: %d.\n", __FUNCTION__, err); return err; } - printf("%s/%s Received from %d\n", __TASKNAME__, __FUNCTION__, VFS_TID); + // printf("%s/%s Received from %d\n", __TASKNAME__, __FUNCTION__, VFS_TID); /* Check if syscall was successful */ if ((err = l4_get_retval()) < 0) { @@ -360,8 +360,8 @@ int fd_close(l4id_t sender, int fd) /* Get the task */ BUG_ON(!(task = find_task(sender))); - printf("%s: Closing fd: %d on task %d\n", __FUNCTION__, - fd, task->tid); + // printf("%s: Closing fd: %d on task %d\n", __FUNCTION__, + // fd, task->tid); if ((err = vfs_close(task->tid, fd)) < 0) return err; diff --git a/tasks/mm0/src/task.c b/tasks/mm0/src/task.c index 4e11f63..643ac0f 100644 --- a/tasks/mm0/src/task.c +++ b/tasks/mm0/src/task.c @@ -442,7 +442,7 @@ int start_boot_tasks(struct initdata *initdata) break; } while (1); - /* MM0 needs partial initialisation, since its already running. */ + /* MM0 needs partial initialisation since it's already running. */ printf("%s: Initialising mm0 tcb.\n", __TASKNAME__); ids.tid = PAGER_TID; ids.spid = PAGER_TID;