Initial documentation for system calls
This commit is contained in:
parent
2029279601
commit
065b782951
1 changed files with 110 additions and 32 deletions
82
user/user.h
82
user/user.h
|
@ -4,43 +4,121 @@
|
|||
|
||||
struct stat;
|
||||
|
||||
// system calls
|
||||
/**
|
||||
* System calls
|
||||
*/
|
||||
|
||||
/** Create a child process */
|
||||
int fork(void);
|
||||
|
||||
/** Exit (terminate) the calling process */
|
||||
int exit(int) __attribute__((noreturn));
|
||||
|
||||
/** Blocks the calling process until child process terminates. */
|
||||
int wait(int *);
|
||||
|
||||
/** pipe */
|
||||
int pipe(int *);
|
||||
|
||||
/** write */
|
||||
int write(int, const void *, int);
|
||||
|
||||
/** read */
|
||||
int read(int, void *, int);
|
||||
|
||||
/** close */
|
||||
int close(int);
|
||||
|
||||
/** kill */
|
||||
int kill(int);
|
||||
|
||||
/** exec */
|
||||
int exec(const char *, char **);
|
||||
|
||||
/** open */
|
||||
int open(const char *, int);
|
||||
|
||||
/** mknod */
|
||||
int mknod(const char *, short, short);
|
||||
|
||||
/** unlink */
|
||||
int unlink(const char *);
|
||||
|
||||
/** fstat */
|
||||
int fstat(int fd, struct stat *);
|
||||
|
||||
/** link */
|
||||
int link(const char *, const char *);
|
||||
|
||||
/** mkdir */
|
||||
int mkdir(const char *);
|
||||
|
||||
/** chdir */
|
||||
int chdir(const char *);
|
||||
|
||||
/** dup */
|
||||
int dup(int);
|
||||
|
||||
/** getpid */
|
||||
int getpid(void);
|
||||
|
||||
/** sbrk */
|
||||
char *sbrk(int);
|
||||
|
||||
/** sleep */
|
||||
int sleep(int);
|
||||
|
||||
/** uptime */
|
||||
int uptime(void);
|
||||
|
||||
/** trace */
|
||||
int trace(int);
|
||||
|
||||
// ulib.c
|
||||
/**
|
||||
* Library functions (ulib.c)
|
||||
*/
|
||||
|
||||
/** stat */
|
||||
int stat(const char *, struct stat *);
|
||||
|
||||
/** strcpy */
|
||||
char *strcpy(char *, const char *);
|
||||
|
||||
/** memmove */
|
||||
void *memmove(void *, const void *, int);
|
||||
|
||||
/** strchr */
|
||||
char *strchr(const char *, char c);
|
||||
|
||||
/** strcmp */
|
||||
int strcmp(const char *, const char *);
|
||||
|
||||
/** fprintf */
|
||||
void fprintf(int, const char *, ...);
|
||||
|
||||
/** printf */
|
||||
void printf(const char *, ...);
|
||||
|
||||
/** gets */
|
||||
char *gets(char *, int max);
|
||||
|
||||
/** strlen */
|
||||
u32 strlen(const char *);
|
||||
|
||||
/** memset */
|
||||
void *memset(void *, int, u32);
|
||||
|
||||
/** malloc */
|
||||
void *malloc(u32);
|
||||
|
||||
/** free */
|
||||
void free(void *);
|
||||
|
||||
/** atoi */
|
||||
int atoi(const char *);
|
||||
|
||||
/** memcmp */
|
||||
int memcmp(const void *, const void *, u32);
|
||||
|
||||
/** memcpy */
|
||||
void *memcpy(void *, const void *, u32);
|
||||
|
|
Loading…
Reference in a new issue