⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defs.h

📁 美国mit操作系统课程所用的一个教学操作系统xv6
💻 H
字号:
struct buf;struct context;struct file;struct inode;struct pipe;struct proc;struct spinlock;struct stat;// bio.cvoid            binit(void);struct buf*     bread(uint, uint);void            brelse(struct buf*);void            bwrite(struct buf*);// console.cvoid            console_init(void);void            cprintf(char*, ...);void            console_intr(int(*)(void));void            panic(char*) __attribute__((noreturn));// exec.cint             exec(char*, char**);// file.cstruct file*    filealloc(void);void            fileclose(struct file*);struct file*    filedup(struct file*);void            fileinit(void);int             fileread(struct file*, char*, int n);int             filestat(struct file*, struct stat*);int             filewrite(struct file*, char*, int n);// fs.cint             dirlink(struct inode*, char*, uint);struct inode*   dirlookup(struct inode*, char*, uint*);struct inode*   ialloc(uint, short);struct inode*   idup(struct inode*);void            iinit(void);void            ilock(struct inode*);void            iput(struct inode*);void            iunlock(struct inode*);void            iunlockput(struct inode*);void            iupdate(struct inode*);int             namecmp(const char*, const char*);struct inode*   namei(char*);struct inode*   nameiparent(char*, char*);int             readi(struct inode*, char*, uint, uint);void            stati(struct inode*, struct stat*);int             writei(struct inode*, char*, uint, uint);// ide.cvoid            ide_init(void);void            ide_intr(void);void            ide_rw(struct buf *);// ioapic.cvoid            ioapic_enable(int irq, int cpu);extern uchar    ioapic_id;void            ioapic_init(void);// kalloc.cchar*           kalloc(int);void            kfree(char*, int);void            kinit(void);// kbd.cvoid            kbd_intr(void);// lapic.cint             cpu(void);extern volatile uint*    lapic;void            lapic_eoi(void);void            lapic_init(int);void            lapic_startap(uchar, uint);// mp.cextern int      ismp;int             mp_bcpu(void);void            mp_init(void);void            mp_startthem(void);// picirq.cvoid            pic_enable(int);void            pic_init(void);// pipe.cint             pipealloc(struct file**, struct file**);void            pipeclose(struct pipe*, int);int             piperead(struct pipe*, char*, int);int             pipewrite(struct pipe*, char*, int);// proc.cstruct proc*    copyproc(struct proc*);struct proc*    curproc(void);void            exit(void);int             growproc(int);int             kill(int);void            pinit(void);void            procdump(void);void            scheduler(void) __attribute__((noreturn));void            setupsegs(struct proc*);void            sleep(void*, struct spinlock*);void            userinit(void);int             wait(void);void            wakeup(void*);void            yield(void);// swtch.Svoid            swtch(struct context*, struct context*);// spinlock.cvoid            acquire(struct spinlock*);void            getcallerpcs(void*, uint*);int             holding(struct spinlock*);void            initlock(struct spinlock*, char*);void            release(struct spinlock*);void            pushcli();void            popcli();// string.cint             memcmp(const void*, const void*, uint);void*           memmove(void*, const void*, uint);void*           memset(void*, int, uint);char*           safestrcpy(char*, const char*, int);int             strlen(const char*);int             strncmp(const char*, const char*, uint);char*           strncpy(char*, const char*, int);// syscall.cint             argint(int, int*);int             argptr(int, char**, int);int             argstr(int, char**);int             fetchint(struct proc*, uint, int*);int             fetchstr(struct proc*, uint, char**);void            syscall(void);// timer.cvoid            timer_init(void);// trap.cvoid            idtinit(void);extern int      ticks;void            tvinit(void);extern struct spinlock tickslock;// number of elements in fixed-size array#define NELEM(x) (sizeof(x)/sizeof((x)[0]))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -