xv6-cs450/defs.h
rtm 8148b6ee53 i think my cmpxchg use was wrong in acquire
nesting cli/sti: release shouldn't always enable interrupts
separate setup of lapic from starting of other cpus, so cpu() works earlier
flag to disable locking in console output
make locks work even when curproc==0
(still crashes in clock interrupt)
2006-07-12 11:15:38 +00:00

89 lines
1.9 KiB
C

// kalloc.c
char *kalloc(int n);
void kfree(char *cp, int len);
void kinit(void);
// console.c
void cprintf(char *fmt, ...);
void panic(char *s);
void cons_putc(int);
// proc.c
struct proc;
struct jmpbuf;
void setupsegs(struct proc *);
struct proc * newproc(void);
void swtch(int);
void sleep(void *);
void wakeup(void *);
void scheduler(void);
void proc_exit(void);
void yield(void);
void cli(void);
void sti(void);
// swtch.S
struct jmpbuf;
int setjmp(struct jmpbuf*);
void longjmp(struct jmpbuf*);
// trap.c
void tvinit(void);
void idtinit(void);
// string.c
void * memcpy(void *dst, void *src, unsigned n);
void * memset(void *dst, int c, unsigned n);
int memcmp(const void *v1, const void *v2, unsigned n);
void *memmove(void *dst, const void *src, unsigned n);
int strncmp(const char *p, const char *q, unsigned n);
// syscall.c
void syscall(void);
// picirq.c
extern uint16_t irq_mask_8259A;
void irq_setmask_8259A(uint16_t mask);
void pic_init(void);
// mp.c
void mp_init(void);
void mp_startthem(void);
int cpu(void);
int mp_isbcpu(void);
void lapic_init(int);
void lapic_timerinit(void);
void lapic_timerintr(void);
void lapic_enableintr(void);
void lapic_disableintr(void);
// spinlock.c
struct spinlock;
void acquire(struct spinlock * lock);
void release(struct spinlock * lock);
// main.c
void load_icode(struct proc *p, uint8_t *binary, unsigned size);
// pipe.c
struct pipe;
struct fd;
int pipe_alloc(struct fd **fd1, struct fd **fd2);
void pipe_close(struct pipe *p, int writeable);
int pipe_write(struct pipe *p, char *addr, int n);
int pipe_read(struct pipe *p, char *addr, int n);
// fd.c
int fd_ualloc();
struct fd * fd_alloc();
void fd_close(struct fd *);
int fd_read(struct fd *fd, char *addr, int n);
int fd_write(struct fd *fd, char *addr, int n);
void fd_reference(struct fd *fd);
// ide.c
void ide_init(void);
void ide_intr(void);
void* ide_start_read(uint32_t secno, void *dst, unsigned nsecs);
int ide_finish_read(void *);