#include <linux/module.h>
#include <rtai.h>
int interrupt_count = 0;
static void irq7_handler(void)
{
	interrupt_count++;
}
int init_module(void)
{
	outb(0x0, 0x378);
	rt_request_global_irq(7, irq7_handler);
	rt_enable_irq(7);
	outb(inb(0x37a)|0x10, 0x37a);
	return 0;
}
void cleanup_module(void)
{
	outb(inb(0x37a)&~0x10, 0x37a);
	rt_printk("%d\n",rt_free_global_irq(7));
	rt_printk("interrupt_count: %d\n", interrupt_count);
}
