BSP_install_rtems_irq_handler API

VALETTE Eric valette at crf.canon.fr
Thu Jan 10 10:07:01 UTC 2002


Till Straumann wrote:


> 
> costs just ONE instruction compared to passing nothing at all!!


Not sure of that one. Did you actually coded it to see what the compiler 
does? Few instructions probably about 4 asm ones but this is not the 
point except that this is that compared to an additional function call 
for some handlers that need the faeture you propose with the trampoline 
solution.


> 
> compare this to the ~250 instructions of the exception handling
> and ISR dispatching code.


This is not comparable. Most of the 250 instrtuctiron you mention are 
unavoidable if you want to have reentrant, prioritizable interrupts. 
This specific instruction can be saved as it is just a convenient thing 
for some irq handler.

What is the cost of an extra function call compared to 250 instructions 
as with the trampoline solution :-)

Note that I do not argue about the aesthetic part of the proposed design 
for which I agree a void* parameter is the more elegant solution. But in 
that case do not forget to get the information about the irq handle back 
when using getCurrent of Disconnect.



> Honestly, I really see _no_ benefit in saving this one instruction.

How many handler would actually use this feature. What percentage of 
interrupt handling does this represent? If I have a system that spend 
90% of its time handling a dedicated interrupts any instruction saved is 
big win...

Anyway, I personnaly agree with the design you propose just make sure 
that other can comment so that we will not change IRQ API each year. I 
had a good reason to change IRQ API : I needed an exception management 
API to
	1) Implement remote debugging over TCP/IP,
	2) Be able to have more robust system,

And also I wanted to be able to have priorities among IRQ on processor/ 
PIC that can offer it.

You request is just for convenience as you can acheive what you want 
with the current API.


-- 
    __
   /  `                          Eric Valette - Canon CRF
  /--   __  o _.                 Product Dev. Group Software Team Leader
(___, / (_(_(__                 Rue de la touche lambert
                                 35517 Cesson-Sevigne  Cedex
                                 FRANCE
Tel: +33 (0)2 99 87 68 91       Fax: +33 (0)2 99 84 11 30
E-mail: valette at crf.canon.fr    http://www.crf.canon.fr




More information about the users mailing list