From c6aa053941ff404170bad5efc5450552afc744aa Mon Sep 17 00:00:00 2001 From: David Reid Date: Fri, 19 Jul 2002 18:28:57 +0000 Subject: [PATCH] Add some new functions for the big change coming (again) for the interrupt code. Also start adding doxygen comments :) git-svn-id: file:///srv/svn/repos/haiku/trunk/current@347 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/kernel/int.h | 42 ++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/headers/private/kernel/int.h b/headers/private/kernel/int.h index 58ba1ec6b3..c9a98bceae 100755 --- a/headers/private/kernel/int.h +++ b/headers/private/kernel/int.h @@ -8,25 +8,47 @@ #include #include +/** + * @defgroup kernelint Interrupts + * @ingroup OpenBeOS_Kernel + * @brief Interrupts for the kernel and device drivers + * @{ + */ + +/** + * @defgroup Intreturns Interrupt Handler return codes + * @ingroup kernelint + * @{ + */ +/** @def B_UNHANDLED_INTERRUPT interrupt wasn't handled by this handler */ +/** @def B_HANDLED_INTERRUPT the handler handled the interrupt */ +/** @def B_INVOKE_SCHEDULER the handler handled the interrupt and wants the + * scheduler invoked + */ +#define B_UNHANDLED_INTERRUPT 0 +#define B_HANDLED_INTERRUPT 1 +#define B_INVOKE_SCHEDULER 2 +/** @} */ + +/** @def B_NO_ENABLE_COUNTER add the handler but don't change whether or + * not the interrupt is currently enabled + */ +#define B_NO_ENABLE_COUNTER 1 + +typedef int32 (*interrupt_handler) (void *data); + int int_init(kernel_args *ka); int int_init2(kernel_args *ka); int int_io_interrupt_handler(int vector); +long install_interrupt_handler(long, interrupt_handler, void *); +long remove_interrupt_handler (long, interrupt_handler, void *); #define int_enable_interrupts arch_int_enable_interrupts #define int_disable_interrupts arch_int_disable_interrupts #define int_restore_interrupts arch_int_restore_interrupts #define int_is_interrupts_enabled arch_int_is_interrupts_enabled -#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 */ - -#define B_NO_ENABLE_COUNTER 1 - -typedef int32 (*interrupt_handler) (void *data); - /* interrupt handling support for device drivers */ - long install_io_interrupt_handler ( long interrupt_number, interrupt_handler handler, @@ -40,4 +62,6 @@ long remove_io_interrupt_handler ( void *data ); +/** @} */ + #endif /* _KERNEL_INT_H */