-
Notifications
You must be signed in to change notification settings - Fork 128
/
kernel.h
43 lines (27 loc) · 836 Bytes
/
kernel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <bmk/machine/md.h>
#ifndef _LOCORE
#include <bmk/types.h>
extern unsigned long bmk_memsize;
#define round_page(x) (((x) + (PAGE_SIZE-1)) & ~(PAGE_SIZE-1))
#define trunc_page(x) ((x) & ~(PAGE_SIZE-1))
void bmk_halt(const char *) __attribute__((noreturn));
struct multiboot_info;
void bmk_multiboot(struct multiboot_info *);
void bmk_run(char *);
void bmk_cons_clear(void);
void bmk_cons_putc(int);
void bmk_cons_puts(const char *);
void bmk_cpu_init(void);
void bmk_cpu_nanohlt(void);
int bmk_cpu_intr_init(int);
void bmk_cpu_intr_ack(void);
bmk_time_t bmk_cpu_clock_now(void);
void bmk_isr_clock(void);
void bmk_isr(int);
int bmk_intr_init(void);
int bmk_isr_init(int (*)(void *), void *, int);
void bmk_mainthread(void *);
#endif /* _LOCORE */
#include <bmk-core/errno.h>
#define BMK_MAXINTR 32
#define HZ 100