API modification request
Eric Valette
eric.valette at free.fr
Sat Feb 1 10:55:58 UTC 2003
Till Straumann wrote:
> typedef void (*rtems_irq_hdl)(void*);
Not that years ago, I even submitted a patch to at least get the irq number.
> I'm positive we can identify some superfluous instructions in the
> ISR calling code to trade in for the handler argument ;-)
Try just for fun. I spend quite some time already to tune and retune
this code :-). We had application were CPU is doing IRQ 80% of its time...
> 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?
Again, I already submitted a patch years ago to at least get the irq
index (which is faster as usually already computed to get the table
index for handlers) for ix86. A void* while surely more pleasant and
more powerfull has to be found in a table and therefore stored when you
register the handler. So I think it is not just one instruction. If you
store the handler and its argument in the same table, you need to do
some extra computation to get both the handler and the argument, if you
store them in two different table then you need to fetch extra base address.
NB : the global function for manipuation the total irq table prototype
have to be updated too.
Now concerning your quetion and the trend of CPU to double speed each
year, I think time has come to offer a richer API at the cost of around
6 to 10 instructions on most processors. As you point out, not doing it
for application requiring it leads to even more code and complexity. It
just penalize application not using it and (at least agree with that)
can be implemenred with current API using a trampoline function.
--
__
/ ` Eric Valette
/-- __ o _. 6 rue Paul Le Flem
(___, / (_(_(__ 35740 Pace
Tel: +33 (0)2 99 85 26 76 Fax: +33 (0)2 99 85 26 76
E-mail: eric.valette at free.fr
More information about the users
mailing list