update lab1-8 codes and docs. now version is 0.2
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ sys_pgdir(void) {
|
||||
return syscall(SYS_pgdir);
|
||||
}
|
||||
|
||||
size_t
|
||||
int
|
||||
sys_gettime(void) {
|
||||
return syscall(SYS_gettime);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user