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
This commit is contained in:
parent
161de6e63c
commit
c6aa053941
@ -8,25 +8,47 @@
|
||||
#include <stage2.h>
|
||||
#include <arch/int.h>
|
||||
|
||||
/**
|
||||
* @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 */
|
||||
|
Loading…
Reference in New Issue
Block a user