API modification request
Till Straumann
strauman at SLAC.Stanford.EDU
Fri Jan 31 21:05:14 UTC 2003
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?
-- Till
More information about the users
mailing list