mirror of
https://github.com/drasko/codezero.git
synced 2026-04-30 23:51:30 +02:00
Modified the kernel and all tasks with well-formatted printout messages.
This commit is contained in:
@@ -22,59 +22,25 @@ void wait_pager(l4id_t partner)
|
||||
// printf("Pager synced with us.\n");
|
||||
}
|
||||
|
||||
pid_t pid;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
printf("\n%s: Started with tid %d.\n", __TASKNAME__, self_tid());
|
||||
/* Sync with pager */
|
||||
|
||||
wait_pager(0);
|
||||
|
||||
dirtest();
|
||||
|
||||
exectest();
|
||||
// exectest();
|
||||
|
||||
/* Check mmap/munmap */
|
||||
mmaptest();
|
||||
|
||||
printf("Forking...\n");
|
||||
if ((pid = fork()) < 0)
|
||||
printf("Error forking...\n");
|
||||
fileio();
|
||||
|
||||
if (pid == 0) {
|
||||
pid = getpid();
|
||||
printf("Child: file IO test 1.\n");
|
||||
if (fileio() == 0)
|
||||
printf("-- Fileio PASSED --\n");
|
||||
else
|
||||
printf("-- Fileio FAILED --\n");
|
||||
forktest();
|
||||
|
||||
printf("Child: forktest.\n");
|
||||
if (forktest() == 0)
|
||||
printf("-- Fork PASSED -- \n");
|
||||
else
|
||||
printf("-- Fork FAILED -- \n");
|
||||
} else {
|
||||
printf("Parent: file IO test 2. child pid %d:\n", pid);
|
||||
if (fileio2() == 0)
|
||||
printf("-- Fileio2 PASSED --\n");
|
||||
else
|
||||
printf("-- Fileio2 FAILED --\n");
|
||||
}
|
||||
|
||||
printf("Testing clone syscall...\n");
|
||||
if ((pid = fork()) < 0)
|
||||
printf("Error forking...\n");
|
||||
/* Child does the clonetest(). All of them will exit */
|
||||
if (pid == 0)
|
||||
clonetest();
|
||||
clonetest();
|
||||
|
||||
while (1)
|
||||
wait_pager(0);
|
||||
#if 0
|
||||
/* Check shmget/shmat/shmdt */
|
||||
shmtest();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user