0
|
1 struct stat;
|
|
2
|
|
3 // system calls
|
|
4 int fork(void);
|
|
5 int exit(void) __attribute__((noreturn));
|
|
6 int wait(void);
|
|
7 int pipe(int*);
|
|
8 int write(int, void*, int);
|
|
9 int read(int, void*, int);
|
|
10 int close(int);
|
|
11 int kill(int);
|
|
12 int exec(char*, char**);
|
|
13 int open(char*, int);
|
|
14 int mknod(char*, short, short);
|
|
15 int unlink(char*);
|
|
16 int fstat(int fd, struct stat*);
|
|
17 int link(char*, char*);
|
|
18 int mkdir(char*);
|
|
19 int chdir(char*);
|
|
20 int dup(int);
|
|
21 int getpid(void);
|
|
22 char* sbrk(int);
|
|
23 int sleep(int);
|
|
24 int uptime(void);
|
|
25
|
|
26 // ulib.c
|
|
27 int stat(char*, struct stat*);
|
|
28 char* strcpy(char*, char*);
|
|
29 void *memmove(void*, void*, int);
|
|
30 char* strchr(const char*, char c);
|
|
31 int strcmp(const char*, const char*);
|
|
32 void printf(int, char*, ...);
|
|
33 char* gets(char*, int max);
|
|
34 uint strlen(char*);
|
|
35 void* memset(void*, int, uint);
|
|
36 void* malloc(uint);
|
|
37 void free(void*);
|
|
38 int atoi(const char*);
|