On Tue, Jul 25, 2000 at 01:42:42PM -0600, [EMAIL PROTECTED] wrote:
> On Tue, Jul 25, 2000 at 07:15:43PM +0200, Tomasz Motylewski wrote:
> > On Tue, 25 Jul 2000 [EMAIL PROTECTED] wrote:
> > 
> > > 1. Can I use one funtion several times as interupt handler ?
> > 
> > Yes, you can.
> > 
> > > 2. How can I find out which interrupt triggered the handler function ?
> > 
> > Very good question ! I was searching once and I was not able to find an
> > answer. 
> 
> Define a capture function for each irq 
> 
> catch_irq_10( ...){ common_irq(10); ...}
> 
> Or, in V3 RTLinux us the sigaction call to install a handler and the
> first argument is the irq#, or, in  earlier versions of RTLinux 
> use rtl_request_irq and the first argument is the irq#, or you can 
> can extract the signal number from the pt_regs argument -- in x86 it is in 
> the eax field. 


Why don't you just use a Linux-like void *dev_id?  Is it the
migration difficulties in changing function prototypes, or is there
some fundamental reason?  The lack of a callback handle really makes
writing correct drivers a pain.



dave...


-- [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/

Reply via email to