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,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;
}

View File

@@ -84,7 +84,7 @@ sys_sleep(unsigned int time) {
return syscall(SYS_sleep, time);
}
size_t
int
sys_gettime(void) {
return syscall(SYS_gettime);
}

View File

@@ -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
View File

0
code/lab8/user/sh.c Normal file → Executable file
View File