Rev 513 |
Rev 526 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#include <linuxcomp.h>
#include <asm/ptrace.h>
#include <asm-generic/errno-base.h>
#include <linux/kernel.h>
extern void *int_arg_table[64];
extern void *int_func_table[64];
int intr_count = 0;
/*
* Generic Linux interrupt handler.
*/
void linux_intr(int irq)
{
struct pt_regs regs;
intr_count++;
if (int_func_table[irq] != NULL)
(* (void (*)(int, void *dev_id, struct pt_regs *))int_func_table[irq])(irq, int_arg_table[irq], ®s);
intr_count--;
}
/*
* Attach a handler to an IRQ.
*/
int request_irq(unsigned int irq, void (*handler)(int, void *dev_id, struct pt_regs *), unsigned long flags, const char *device, void *dev_id)
{
shark_handler_set(irq, (void *)(handler), dev_id);
return 0;
}
/*
* Deallocate an irq.
*/
void free_irq(unsigned int irq, void *a)
{
shark_handler_remove(irq);
}