Function pointer within isr

Gedare Bloom gedare at rtems.org
Mon Jun 30 17:07:32 UTC 2014


On Mon, Jun 30, 2014 at 12:52 PM, Wendell Silva <silvawp at gmail.com> wrote:
> André,
>
> Technically, you should be able to call functions (directly or indirectly)
> in any point of your program. AFAIK, there are only a subset of RTEMS
> directives you shouldn't call from an ISR.
If the function does not 'sleep' it should be ok. Some other issues
involve whether you try to access the executing task context, which
may not work right. The full set of safe RTEMS functions are:
http://rtems.org/onlinedocs/doc-current/share/rtems/html/c_user/Interrupt-Manager-Directives-Allowed-from-an-ISR.html#Interrupt-Manager-Directives-Allowed-from-an-ISR

In general, you should be able to call a function. Make sure the
function pointer is valid (points to a function you expect). If the
function is calling printf then you may definitely have a problem.

-Gedare

> What kind of error have you got? BSP?
>
> --Wendell.
>
>
>
> 2014-06-30 13:47 GMT-03:00 Andre Marques <andre.lousa.marques at gmail.com>:
>
>> Hello,
>>
>> I am trying to call a function through a function pointer from an
>> interrupt handler, but I am not sure if this is even possible as the system
>> hangs at that point. If not, is there any way in RTEMS to have that function
>> executed outside the isr?
>>
>> Thanks,
>> André Marques.
>>
>>
>> _______________________________________________
>> devel mailing list
>> devel at rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
>
>
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list