Xv6 with picoc & Linkage editor
v1.0
The project delineate mutual cohesion between c library, linkage editor ( linker), interpreter and operating system by porting the same on xv6 kernel
|
00001 struct stat; 00002 #define NULL ((void *)(0)) 00003 // system calls 00004 int fork(void); 00005 int exit(int) __attribute__((noreturn)); 00006 int _exit(int) __attribute__((noreturn)); 00007 int wait(void); 00008 int pipe(int*); 00009 int write(int, void*, int); 00010 int read(int, void*, int); 00011 int close(int); 00012 int kill(int); 00013 int exec(char*, char**); 00014 int execve(char*, char**,char **); 00015 int open(char*, int); 00016 int mknod(char*, short, short); 00017 int unlink(char*); 00018 int fstat(int fd, struct stat*); 00019 int link(char*, char*); 00020 int mkdir(char*); 00021 int chdir(char*); 00022 int dup(int); 00023 int getpid(void); 00024 char* sbrk(int); 00025 int sleep(int); 00026 int uptime(void); 00027 int lseek(int,int,int); 00028 int mmap(void *addr, int len, int prot, int flags, int fd, int offset); 00029 // ulib.c 00030 int stat(char*, struct stat*); 00031 int fsstat(int , struct stat*); 00032 char* strcpy(char*, char*); 00033 char* strncpy(char*, char*,int); 00034 int memcmp(const void*, const void*,int); 00035 void *memmove(void*, void*, int); 00036 void *memcpy(void*, void*, int); 00037 char* strchr(const char*, char c); 00038 char* strcat(char *,char *); 00039 int strcmp(const char*, const char*); 00040 int strncmp(const char*, const char*,int); 00041 int sprintf(char *,char *, ...); 00042 int snprintf(char *str,int n,char *fmt,...); 00043 int printf(char*, ...); 00044 char* gets(char*, int max); 00045 uint strlen(char*); 00046 void* memset(void*, int, uint); 00047 void* malloc(uint); 00048 void free(void*); 00049 int atoi(const char*); 00050 double pow(double x, double y); 00051 double exp(double d); 00052 double log(double d);