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

@@ -8,11 +8,11 @@
#include <l4lib/ipcdefs.h>
#include <l4lib/arch/syscalls.h>
#include <l4lib/arch/syslib.h>
#include <vfs.h>
#include <lib/malloc.h>
#include <string.h>
#include <stdio.h>
#include <task.h>
#include <vfs.h>
/*
* This notifies mm0 that this is the fd that refers to this vnode number
@@ -26,9 +26,9 @@ int send_pager_opendata(l4id_t sender, int fd, unsigned long vnum)
{
int err;
write_mr(L4SYS_ARG0, sender);
write_mr(L4SYS_ARG1, fd);
write_mr(L4SYS_ARG2, vnum);
write_mr(sender, L4SYS_ARG0);
write_mr(fd, L4SYS_ARG1);
write_mr(vnum, L4SYS_ARG2);
if ((err = l4_send(PAGER_TID, L4_IPC_TAG_OPENDATA)) < 0) {
printf("%s: L4 IPC Error: %d.\n", __FUNCTION__, err);

View File

@@ -56,10 +56,13 @@ int receive_pager_taskdata(l4id_t *tdata)
__FUNCTION__);
BUG();
}
// printf("%s: %d Total tasks.\n", __FUNCTION__, tdata[0]);
/* Now read task ids. */
for (int i = 0; i < (int)tdata[0]; i++)
for (int i = 0; i < (int)tdata[0]; i++) {
tdata[1 + i] = (l4id_t)read_mr(L4SYS_ARG1 + i);
// printf("%s: Task id: %d\n", __FUNCTION__, tdata[1 + i]);
}
return 0;
}
@@ -92,7 +95,7 @@ int init_task_structs(l4id_t *tdata)
return 0;
}
void init_task_data(void)
int init_task_data(void)
{
l4id_t tdata[MR_UNUSED_TOTAL];
@@ -102,6 +105,8 @@ void init_task_data(void)
BUG_ON(receive_pager_taskdata(tdata) < 0);
/* Initialise local task structs using this info */
init_task_structs(tdata);
BUG_ON(init_task_structs(tdata) < 0);
return 0;
}