[PATCH] Updated Legacy code in arm gba
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Jul 12 12:06:07 UTC 2013
Thanks for the patch:
http://git.rtems.org/rtems/commit/?id=9b6add418c0fefba50f7360453d4ca93a1379968
On 07/12/2013 01:34 PM, Vipul Nayyar wrote:
[...]
> #define Clock_driver_support_install_isr( _new, _old ) \
> do { \
> - BSP_install_rtems_irq_handler(&clock_isr_data); \
> + rtems_status_code status = RTEMS_SUCCESSFUL; \
> + status = rtems_interrupt_handler_install( \
> + BSP_IRQ_TIMER3, \
> + "Clock", \
> + RTEMS_INTERRUPT_UNIQUE, \
> + Clock_isr, \
> + NULL \
> + ); \
> + assert(status == RTEMS_SUCCESSFUL); \
> _old = NULL; \
> } while(0)
[...]
If you can assign a value before you call a global function, then do it. This
helps to avoid the saving of state around function calls.
So in this example it is better to move the "_old = NULL;" before the
rtems_interrupt_handler_install(). It makes no difference here in this special
case, but you should keep this in mind.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list