2002-07-09 16:24:59 +04:00
|
|
|
/*
|
|
|
|
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
|
|
|
** Distributed under the terms of the NewOS License.
|
|
|
|
*/
|
|
|
|
#ifndef _KERNEL_INT_H
|
|
|
|
#define _KERNEL_INT_H
|
|
|
|
|
2002-10-26 20:13:36 +04:00
|
|
|
#include <KernelExport.h>
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2003-05-03 20:03:26 +04:00
|
|
|
#include <arch/int.h>
|
2002-07-19 22:28:57 +04:00
|
|
|
|
2003-05-03 20:03:26 +04:00
|
|
|
struct kernel_args;
|
2002-07-19 22:28:57 +04:00
|
|
|
|
2003-05-03 20:03:26 +04:00
|
|
|
/* adds the handler but don't change whether or not the interrupt is currently enabled */
|
|
|
|
#define B_NO_ENABLE_COUNTER 1
|
2002-07-19 22:28:57 +04:00
|
|
|
|
2003-05-03 20:03:26 +04:00
|
|
|
int int_init(struct kernel_args *ka);
|
|
|
|
int int_init2(struct kernel_args *ka);
|
2002-07-25 05:02:18 +04:00
|
|
|
int int_io_interrupt_handler(int vector);
|
2002-07-19 22:28:57 +04:00
|
|
|
long install_interrupt_handler(long, interrupt_handler, void *);
|
|
|
|
long remove_interrupt_handler (long, interrupt_handler, void *);
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2002-10-26 20:13:36 +04:00
|
|
|
#define enable_interrupts arch_int_enable_interrupts
|
2002-07-25 05:02:18 +04:00
|
|
|
#define are_interrupts_enabled arch_int_is_interrupts_enabled
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2002-11-28 05:25:04 +03:00
|
|
|
/* during kernel startup, interrupts are disabled */
|
|
|
|
extern bool kernel_startup;
|
|
|
|
|
2002-07-19 20:00:17 +04:00
|
|
|
#endif /* _KERNEL_INT_H */
|