update lab1-8 codes and docs. now version is 0.2

This commit is contained in:
chyyuu
2012-08-26 18:04:26 +08:00
parent 15f7ebf37b
commit d537948e30
134 changed files with 1268 additions and 1005 deletions

View File

@@ -3,7 +3,7 @@
#include <string.h>
#define DEPTH 4
#define SLEEP_TIME 400
void forktree(const char *cur);
void
@@ -31,8 +31,6 @@ forktree(const char *cur) {
int
main(void) {
cprintf("forktree process will sleep %d ticks\n",SLEEP_TIME);
sleep(SLEEP_TIME);
forktree("");
return 0;
}

View File

@@ -70,7 +70,7 @@ sys_pgdir(void) {
return syscall(SYS_pgdir);
}
size_t
int
sys_gettime(void) {
return syscall(SYS_gettime);
}

View File

@@ -9,6 +9,7 @@ int sys_kill(int pid);
int sys_getpid(void);
int sys_putc(int c);
int sys_pgdir(void);
int sys_gettime(void);
/* FOR LAB6 ONLY */
void sys_lab6_set_priority(uint32_t priority);

View File

@@ -3,7 +3,7 @@
int
main(void) {
int pid, ret, i ,j;
int pid, ret;
cprintf("I am the parent. Forking the child...\n");
pid = fork();
if (pid== 0) {