2009-04-21 00:31:13 +02:00
|
|
|
#ifndef __SYS_INTERRUPT_H
|
|
|
|
#define __SYS_INTERRUPT_H
|
2009-04-20 21:42:21 +02:00
|
|
|
|
2009-04-21 00:31:13 +02:00
|
|
|
/* Returns true if it handled an active interrupt */
|
2009-04-20 21:42:21 +02:00
|
|
|
typedef int (*SystemInterruptFunc)();
|
|
|
|
|
|
|
|
typedef struct _SystemInterruptHandler SystemInterruptHandler;
|
|
|
|
struct _SystemInterruptHandler
|
|
|
|
{
|
|
|
|
SystemInterruptHandler *next;
|
|
|
|
SystemInterruptFunc handler;
|
|
|
|
};
|
|
|
|
|
|
|
|
void
|
|
|
|
sys_interrupt_enable();
|
|
|
|
|
|
|
|
void
|
|
|
|
sys_interrupt_disable();
|
|
|
|
|
|
|
|
void
|
|
|
|
sys_interrupt_append_handler(SystemInterruptHandler *handler);
|
|
|
|
|
|
|
|
void
|
|
|
|
sys_interrupt_prepend_handler(SystemInterruptHandler *handler);
|
|
|
|
|
|
|
|
void
|
|
|
|
sys_interrupt_remove_handler(SystemInterruptHandler *handler);
|
|
|
|
|
2009-04-21 00:31:13 +02:00
|
|
|
#endif /* __SYS_INTERRUPT_H */
|