xv6/defs.h

48 lines
982 B
C
Raw Normal View History

2006-06-12 15:22:12 +00:00
// kalloc.c
char *kalloc(int n);
void kfree(char *cp, int len);
2006-06-15 16:02:20 +00:00
void kinit(void);
2006-06-12 15:22:12 +00:00
// console.c
void cprintf(char *fmt, ...);
void panic(char *s);
2006-06-26 15:11:19 +00:00
void cons_putc(int);
2006-06-12 15:22:12 +00:00
// proc.c
struct proc;
2006-06-15 16:02:20 +00:00
void setupsegs(struct proc *);
struct proc * newproc(void);
void swtch(void);
2006-06-15 19:58:01 +00:00
void sleep(void *);
void wakeup(void *);
2006-06-15 16:02:20 +00:00
// trap.c
void tinit(void);
// string.c
void * memcpy(void *dst, void *src, unsigned n);
void * memset(void *dst, int c, unsigned n);
2006-06-21 01:53:07 +00:00
int memcmp(const void *v1, const void *v2, unsigned n);
void *memmove(void *dst, const void *src, unsigned n);
2006-06-15 16:02:20 +00:00
// syscall.c
void syscall(void);
2006-06-16 20:29:25 +00:00
// picirq.c
void irq_setmask_8259A(uint16_t mask);
void pic_init(void);
2006-06-21 01:53:07 +00:00
// mp.c
void mp_init(void);
2006-06-22 20:47:23 +00:00
int cpu(void);
int mp_isbcpu(void);
// spinlock.c
extern uint32_t kernel_lock;
void acquire_spinlock(uint32_t* lock);
void release_spinlock(uint32_t* lock);
void release_grant_spinlock(uint32_t* lock, int cpu);
2006-06-21 01:53:07 +00:00
2006-06-22 20:47:23 +00:00
// main.c
void load_icode(struct proc *p, uint8_t *binary, unsigned size);