> "christophe.menival" wrote:
>
> void ap_handler(void)
> {
> int x;
> x=0;
> }
>
> int init_module(void)
> {
> request_RTirq(12, ap_handler); /* 12 is the port for the mouse */
> return 0
> }
>
> void cleanup_module(void)
> {
> free_Rtirq(12);
> }
>
There is no surprises if you hang-up your system.
I explain:
- at 1st, you request the mouse interrupt for your handle, OK. but you
must remember that this irq is shared
with the mouse and perhaps other thing and in all case handled by linux
! So you need to do a Linux_irq_pend() at the end of your handler.
- at 2nd,( I'm not totally sure for this one ! tell me if I'm wrong)
when you free this Irq, no more handler is available for this one ....
so you need to save the handler before requesting and then restore it
after using.
Chris.
--
Kumsta Christophe
Machinery Agrobotic Fruit
<[EMAIL PROTECTED]>
Real-Time image processing developper
RT-Linux/RTAI ( Use the Source Luck !)
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/