kern

view src/intr.h @ 38:e6f75f91e606

- added makefile pattern to produce assembly output from c source files. - removed a commented out previous version of the gmtime_r function in klibc/time.c
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 10 Jun 2011 23:19:25 +0300
parents 9939a6d7a45a
children f65b348780e3
line source
1 #ifndef INTR_H_
2 #define INTR_H_
4 #include <inttypes.h>
5 #include "asmops.h"
7 /* offset used to remap IRQ numbers (+32) */
8 #define IRQ_OFFSET 32
9 /* conversion macros between IRQ and interrupt numbers */
10 #define IRQ_TO_INTR(x) ((x) + IRQ_OFFSET)
11 #define INTR_TO_IRQ(x) ((x) - IRQ_OFFSET)
12 /* checks whether a particular interrupt is an remapped IRQ */
13 #define IS_IRQ(n) ((n) >= IRQ_OFFSET && (n) < IRQ_OFFSET + 16)
16 typedef void (*intr_func_t)(int, uint32_t);
19 void init_intr(void);
21 void interrupt(int intr_num, intr_func_t func);
23 /* defined in intr-asm.S */
24 int get_intr_state(void);
25 void set_intr_state(int s);
27 #endif /* INTR_H_ */