API modification request

Joel Sherrill joel.sherrill at OARcorp.com
Fri Jan 31 21:36:51 UTC 2003

Till Straumann wrote:
> Hi.
> You may have noticed that I'm in a militant mood today
> and so I dare bringing this up again:
> I propose to change
> typedef void (*rtems_irq_hdl)(void);
> to
> typedef void (*rtems_irq_hdl)(void*);
> i.e. have the option to pass an argument
> to the interrupt handler.
> I want to convince people (especially in the EPICS) community
> that it's easy to port software, essentially from vxWorks, to
> RTEMS. Porting drivers is significantly complicated by the fact
> that an ISR cannot be passed an argument under RTEMS (under vxWorks,
> they can).
> The speed argument heard before is IMHO, ridiculous:
> On the PPC and X86 it takes 1 (ONE) instruction more to do
>   p->hdl(p->arg) instead of p->hdl() as the necessary pointer
> is already in a register). Contrast this with the headache
> and space requirements of writing countless wrappers.
> I'm positive we can identify some superfluous instructions in the
> ISR calling code to trade in for the handler argument ;-)
> As far as I can see, the new semantics would be backwards
> compatible (getting compiler warnings at most).
> Joel, Eric, what's your position on this?

I have never been opposed to it on technical grounds -- only 
on consistency grounds.  All ports should support it. That
raises the implementation stakes a bit.

> -- Till

More information about the users mailing list