kern

diff src/intr.h @ 35:06172322fb76

- made interrupt number - irq mapping macros public in intr.h - disabled the interrupts in various vga driver functions
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 09 Jun 2011 05:09:49 +0300
parents 9939a6d7a45a
children f65b348780e3
line diff
     1.1 --- a/src/intr.h	Thu Jun 09 02:45:49 2011 +0300
     1.2 +++ b/src/intr.h	Thu Jun 09 05:09:49 2011 +0300
     1.3 @@ -4,6 +4,15 @@
     1.4  #include <inttypes.h>
     1.5  #include "asmops.h"
     1.6  
     1.7 +/* offset used to remap IRQ numbers (+32) */
     1.8 +#define IRQ_OFFSET		32
     1.9 +/* conversion macros between IRQ and interrupt numbers */
    1.10 +#define IRQ_TO_INTR(x)	((x) + IRQ_OFFSET)
    1.11 +#define INTR_TO_IRQ(x)	((x) - IRQ_OFFSET)
    1.12 +/* checks whether a particular interrupt is an remapped IRQ */
    1.13 +#define IS_IRQ(n)	((n) >= IRQ_OFFSET && (n) < IRQ_OFFSET + 16)
    1.14 +
    1.15 +
    1.16  typedef void (*intr_func_t)(int, uint32_t);
    1.17  
    1.18