2002-07-09 12:24:59 +00: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 16:13:36 +00:00
|
|
|
#include <KernelExport.h>
|
2002-07-09 12:24:59 +00:00
|
|
|
|
2003-05-03 16:03:26 +00:00
|
|
|
#include <arch/int.h>
|
2002-07-19 18:28:57 +00:00
|
|
|
|
2003-05-03 16:03:26 +00:00
|
|
|
struct kernel_args;
|
2002-07-19 18:28:57 +00:00
|
|
|
|
2003-05-03 16:03:26 +00: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 18:28:57 +00:00
|
|
|
|
2003-05-03 16:03:26 +00:00
|
|
|
int int_init(struct kernel_args *ka);
|
|
|
|
int int_init2(struct kernel_args *ka);
|
2002-07-25 01:02:18 +00:00
|
|
|
int int_io_interrupt_handler(int vector);
|
2002-07-19 18:28:57 +00:00
|
|
|
long install_interrupt_handler(long, interrupt_handler, void *);
|
|
|
|
long remove_interrupt_handler (long, interrupt_handler, void *);
|
2002-07-09 12:24:59 +00:00
|
|
|
|
2002-10-26 16:13:36 +00:00
|
|
|
#define enable_interrupts arch_int_enable_interrupts
|
2002-07-25 01:02:18 +00:00
|
|
|
#define are_interrupts_enabled arch_int_is_interrupts_enabled
|
2002-07-09 12:24:59 +00:00
|
|
|
|
2002-11-28 02:25:04 +00:00
|
|
|
/* during kernel startup, interrupts are disabled */
|
|
|
|
extern bool kernel_startup;
|
|
|
|
|
2002-07-19 16:00:17 +00:00
|
|
|
#endif /* _KERNEL_INT_H */
|