2007-08-28 06:20:25 +02:00
|
|
|
struct stat;
|
|
|
|
|
2006-09-06 03:25:41 +02:00
|
|
|
// system calls
|
2006-07-16 17:36:31 +02:00
|
|
|
int fork(void);
|
2019-09-10 18:30:10 +02:00
|
|
|
int exit(int) __attribute__((noreturn));
|
|
|
|
int wait(int*);
|
2006-07-16 17:36:31 +02:00
|
|
|
int pipe(int*);
|
2018-08-31 15:21:19 +02:00
|
|
|
int write(int, const void*, int);
|
2006-07-16 17:36:31 +02:00
|
|
|
int read(int, void*, int);
|
|
|
|
int close(int);
|
|
|
|
int kill(int);
|
2022-08-18 02:38:11 +02:00
|
|
|
int exec(const char*, char**);
|
2018-08-31 15:21:19 +02:00
|
|
|
int open(const char*, int);
|
|
|
|
int mknod(const char*, short, short);
|
|
|
|
int unlink(const char*);
|
2006-09-06 19:27:19 +02:00
|
|
|
int fstat(int fd, struct stat*);
|
2018-08-31 15:21:19 +02:00
|
|
|
int link(const char*, const char*);
|
|
|
|
int mkdir(const char*);
|
|
|
|
int chdir(const char*);
|
2006-08-20 05:08:54 +02:00
|
|
|
int dup(int);
|
2011-01-11 19:01:13 +01:00
|
|
|
int getpid(void);
|
2006-09-06 19:27:19 +02:00
|
|
|
char* sbrk(int);
|
2007-08-27 15:34:35 +02:00
|
|
|
int sleep(int);
|
2011-01-11 19:01:13 +01:00
|
|
|
int uptime(void);
|
2006-08-12 13:38:57 +02:00
|
|
|
|
2006-09-06 03:25:41 +02:00
|
|
|
// ulib.c
|
2018-08-31 15:21:19 +02:00
|
|
|
int stat(const char*, struct stat*);
|
|
|
|
char* strcpy(char*, const char*);
|
|
|
|
void *memmove(void*, const void*, int);
|
2006-09-06 19:27:19 +02:00
|
|
|
char* strchr(const char*, char c);
|
|
|
|
int strcmp(const char*, const char*);
|
2019-08-27 19:13:03 +02:00
|
|
|
void fprintf(int, const char*, ...);
|
|
|
|
void printf(const char*, ...);
|
2006-09-06 19:27:19 +02:00
|
|
|
char* gets(char*, int max);
|
2018-08-31 15:21:19 +02:00
|
|
|
uint strlen(const char*);
|
2007-08-08 11:30:48 +02:00
|
|
|
void* memset(void*, int, uint);
|
2006-09-06 19:27:19 +02:00
|
|
|
void* malloc(uint);
|
|
|
|
void free(void*);
|
2007-08-08 10:56:09 +02:00
|
|
|
int atoi(const char*);
|
2019-10-09 03:18:54 +02:00
|
|
|
int memcmp(const void *, const void *, uint);
|
|
|
|
void *memcpy(void *, const void *, uint);
|