xref: /xv6-public/defs.h (revision bf390361)
1 // kalloc.c
2 char *kalloc(int n);
3 void kfree(char *cp, int len);
4 void kinit(void);
5 
6 // console.c
7 void cprintf(char *fmt, ...);
8 void panic(char *s);
9 void cons_putc(int);
10 
11 // proc.c
12 struct proc;
13 void setupsegs(struct proc *);
14 struct proc * newproc(void);
15 void swtch(void);
16 void sleep(void *);
17 void wakeup(void *);
18 
19 // trap.c
20 void tinit(void);
21 
22 // string.c
23 void * memcpy(void *dst, void *src, unsigned n);
24 void * memset(void *dst, int c, unsigned n);
25 int memcmp(const void *v1, const void *v2, unsigned n);
26 void *memmove(void *dst, const void *src, unsigned n);
27 
28 // syscall.c
29 void syscall(void);
30 
31 // picirq.c
32 void irq_setmask_8259A(uint16_t mask);
33 void pic_init(void);
34 
35 // mp.c
36 void mp_init(void);
37 int cpu(void);
38 int mp_isbcpu(void);
39 
40 // spinlock.c
41 extern uint32_t kernel_lock;
42 void acquire_spinlock(uint32_t* lock);
43 void release_spinlock(uint32_t* lock);
44 void release_grant_spinlock(uint32_t* lock, int cpu);
45 
46 // main.c
47 void load_icode(struct proc *p, uint8_t *binary, unsigned size);
48