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
defs.h
00001 struct buf;
00002 struct context;
00003 struct file;
00004 struct inode;
00005 struct pipe;
00006 struct proc;
00007 struct spinlock;
00008 struct stat;
00009 struct superblock;
00010 
00011 // bio.c
00012 void            binit(void);
00013 struct buf*     bread(uint, uint);
00014 void            brelse(struct buf*);
00015 void            bwrite(struct buf*);
00016 
00017 // console.c
00018 void            consoleinit(void);
00019 void            cprintf(char*, ...);
00020 void            consoleintr(int(*)(void));
00021 void            panic(char*) __attribute__((noreturn));
00022 
00023 // exec.c
00024 int             exec(char*, char**);
00025 
00026 // file.c
00027 struct file*    filealloc(void);
00028 void            fileclose(struct file*);
00029 struct file*    filedup(struct file*);
00030 void            fileinit(void);
00031 int             fileread(struct file*, char*, int n);
00032 int             filestat(struct file*, struct stat*);
00033 int             filewrite(struct file*, char*, int n);
00034 int             fileseek(struct file*, int, int);
00035 
00036 // fs.c
00037 void            readsb(int dev, struct superblock *sb);
00038 int             dirlink(struct inode*, char*, uint);
00039 struct inode*   dirlookup(struct inode*, char*, uint*);
00040 struct inode*   ialloc(uint, short);
00041 struct inode*   idup(struct inode*);
00042 void            iinit(void);
00043 void            ilock(struct inode*);
00044 void            iput(struct inode*);
00045 void            iunlock(struct inode*);
00046 void            iunlockput(struct inode*);
00047 void            iupdate(struct inode*);
00048 int             namecmp(const char*, const char*);
00049 struct inode*   namei(char*);
00050 struct inode*   nameiparent(char*, char*);
00051 int             readi(struct inode*, char*, uint, uint);
00052 void            stati(struct inode*, struct stat*);
00053 int             writei(struct inode*, char*, uint, uint);
00054 
00055 // ide.c
00056 void            ideinit(void);
00057 void            ideintr(void);
00058 void            iderw(struct buf*);
00059 
00060 // ioapic.c
00061 void            ioapicenable(int irq, int cpu);
00062 extern uchar    ioapicid;
00063 void            ioapicinit(void);
00064 
00065 // kalloc.c
00066 char*           kalloc(void);
00067 void            kfree(char*);
00068 void            kinit1(void*, void*);
00069 void            kinit2(void*, void*);
00070 
00071 // kbd.c
00072 void            kbdintr(void);
00073 
00074 // lapic.c
00075 int             cpunum(void);
00076 extern volatile uint*    lapic;
00077 void            lapiceoi(void);
00078 void            lapicinit(int);
00079 void            lapicstartap(uchar, uint);
00080 void            microdelay(int);
00081 
00082 // log.c
00083 void            initlog(void);
00084 void            log_write(struct buf*);
00085 void            begin_trans();
00086 void            commit_trans();
00087 
00088 // mp.c
00089 extern int      ismp;
00090 int             mpbcpu(void);
00091 void            mpinit(void);
00092 void            mpstartthem(void);
00093 
00094 // picirq.c
00095 void            picenable(int);
00096 void            picinit(void);
00097 
00098 // pipe.c
00099 int             pipealloc(struct file**, struct file**);
00100 void            pipeclose(struct pipe*, int);
00101 int             piperead(struct pipe*, char*, int);
00102 int             pipewrite(struct pipe*, char*, int);
00103 
00104 //PAGEBREAK: 16
00105 // proc.c
00106 struct proc*    copyproc(struct proc*);
00107 void            exit(int);
00108 int             fork(void);
00109 int             growproc(int);
00110 int             kill(int);
00111 void            pinit(void);
00112 void            procdump(void);
00113 void            scheduler(void) __attribute__((noreturn));
00114 void            sched(void);
00115 void            sleep(void*, struct spinlock*);
00116 void            userinit(void);
00117 int             wait(void);
00118 void            wakeup(void*);
00119 void            yield(void);
00120 
00121 // swtch.S
00122 void            swtch(struct context**, struct context*);
00123 
00124 // spinlock.c
00125 void            acquire(struct spinlock*);
00126 void            getcallerpcs(void*, uint*);
00127 int             holding(struct spinlock*);
00128 void            initlock(struct spinlock*, char*);
00129 void            release(struct spinlock*);
00130 void            pushcli(void);
00131 void            popcli(void);
00132 
00133 // string.c
00134 int             memcmp(const void*, const void*, uint);
00135 void*           memmove(void*, const void*, uint);
00136 void*           memset(void*, int, uint);
00137 char*           safestrcpy(char*, const char*, int);
00138 int             strlen(const char*);
00139 int             strncmp(const char*, const char*, uint);
00140 char*           strncpy(char*, const char*, int);
00141 
00142 // syscall.c
00143 int             argint(int, int*);
00144 int             argptr(int, char**, int);
00145 int             argstr(int, char**);
00146 int             fetchint(uint, int*);
00147 int             fetchstr(uint, char**);
00148 void            syscall(void);
00149 
00150 // timer.c
00151 void            timerinit(void);
00152 
00153 // trap.c
00154 void            idtinit(void);
00155 extern uint     ticks;
00156 void            tvinit(void);
00157 extern struct spinlock tickslock;
00158 
00159 // uart.c
00160 void            uartinit(void);
00161 void            uartintr(void);
00162 void            uartputc(int);
00163 
00164 // vm.c
00165 void            seginit(void);
00166 void            kvmalloc(void);
00167 void            vmenable(void);
00168 pde_t*          setupkvm();
00169 char*           uva2ka(pde_t*, char*);
00170 int             allocuvm(pde_t*, uint, uint);
00171 int             deallocuvm(pde_t*, uint, uint);
00172 void            freevm(pde_t*);
00173 void            inituvm(pde_t*, char*, uint);
00174 int             loaduvm(pde_t*, char*, struct inode*, uint, uint);
00175 pde_t*          copyuvm(pde_t*, uint);
00176 void            switchuvm(struct proc*);
00177 void            switchkvm(void);
00178 int             copyout(pde_t*, uint, void*, uint);
00179 void            clearpteu(pde_t *pgdir, char *uva);
00180 
00181 // number of elements in fixed-size array
00182 #define NELEM(x) (sizeof(x)/sizeof((x)[0]))
 All Data Structures