{install|remove}_io_interrupt_handler() now correctly handle the B_NO_ENABLE_COUNTER flag.
Lots of cleanup:
- moved B_NO_ENABLE_COUNTER flag definition out of int.h to KernelExport.h, as it's
described in the BeBook (although it's probably not really used that often :))
- int.c no longer has any platform dependent code (+ 0x20 on interrupt numbers is gone);
it's now entirely handled in the arch/x86/ section.
- the io_vectors[] is now statically initialized, instead of allocated from the heap
- removed {install|remove}_interrupt_handler(); they weren't that useful, arch_smp_init()
is now calling install_io_interrupt_handler() correctly instead
- introduced a new arch_int.h header file that currently contains NUM_IO_VECTORS only
(though on x86, it also has ARCH_INTERRUPT_BASE == 0x20).
- changed the return type from {install|remove}_io_interrupt_handler() from "long" to
"status_t"
- rearranged and cleaned the PIC initialization code, made the PIC code more prominent
- changed comments that talk about a non existing 8239 (the PIC chip is actually 8259)
- moved arch/x86/interrupts.h to the source directory, as it's not used outside
- added BeOS compatible interrupts_enabled() function, that should replace our
equivalent (and private) are_interrupts_enabled()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12477 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
/* Kernel only exports for kernel add-ons
|
||||
**
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
*
|
||||
* Copyright 2005, Haiku Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _KERNEL_EXPORT_H
|
||||
#define _KERNEL_EXPORT_H
|
||||
|
||||
@@ -15,6 +16,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------*/
|
||||
/* interrupts and spinlocks */
|
||||
|
||||
/* disable/restore interrupts on the current CPU */
|
||||
|
||||
@@ -36,16 +38,19 @@ extern void release_spinlock(spinlock *lock);
|
||||
|
||||
/* interrupt handling support for device drivers */
|
||||
|
||||
typedef int32 (*interrupt_handler)(void *data);
|
||||
|
||||
/* Values returned by interrupt handlers */
|
||||
#define B_UNHANDLED_INTERRUPT 0 /* pass to next handler */
|
||||
#define B_HANDLED_INTERRUPT 1 /* don't pass on */
|
||||
#define B_INVOKE_SCHEDULER 2 /* don't pass on; invoke the scheduler */
|
||||
|
||||
typedef int32 (*interrupt_handler)(void *data);
|
||||
/* Flags that can be passed to install_io_interrupt_handler() */
|
||||
#define B_NO_ENABLE_COUNTER 1
|
||||
|
||||
extern long install_io_interrupt_handler(long interrupt_number,
|
||||
extern status_t install_io_interrupt_handler(long interrupt_number,
|
||||
interrupt_handler handler, void *data, ulong flags);
|
||||
extern long remove_io_interrupt_handler(long interrupt_number,
|
||||
extern status_t remove_io_interrupt_handler(long interrupt_number,
|
||||
interrupt_handler handler, void *data);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user