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,6 +31,8 @@ forktree(const char *cur) {
|
||||
|
||||
int
|
||||
main(void) {
|
||||
cprintf("forktree process will sleep %d ticks\n",SLEEP_TIME);
|
||||
sleep(SLEEP_TIME);
|
||||
forktree("");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ sys_sleep(unsigned int time) {
|
||||
return syscall(SYS_sleep, time);
|
||||
}
|
||||
|
||||
size_t
|
||||
int
|
||||
sys_gettime(void) {
|
||||
return syscall(SYS_gettime);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ int sys_getpid(void);
|
||||
int sys_putc(int c);
|
||||
int sys_pgdir(void);
|
||||
int sys_sleep(unsigned int time);
|
||||
size_t sys_gettime(void);
|
||||
int sys_gettime(void);
|
||||
|
||||
struct stat;
|
||||
struct dirent;
|
||||
|
||||
0
code/lab8/user/ls.c
Normal file → Executable file
0
code/lab8/user/ls.c
Normal file → Executable file
0
code/lab8/user/sh.c
Normal file → Executable file
0
code/lab8/user/sh.c
Normal file → Executable file
Reference in New Issue
Block a user