This works fine when a task has an exception, but did not work too well when I caught an exception in an ISR.
I found this macro:
_ISR_Is_in_progress
Which I can use to detect if the exception handler is running in an ISR. Is that a good enough way to detect that the code is running in the context of an ISR? Or is there a better/more standard way?
Another option would be to have a high priority exception task running, just waiting to handle the exception clean up activity. The exception handler could use a semaphore to kick off the task.
Thanks,
Alan
_______________________________________________
rtems-users mailing list
rtems...@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-users
On our RTEMS 4.10 project ( m68k/coldfire ), I have an exception handler that does a number of things such as closing files before restarting our processor card.
This works fine when a task has an exception, but did not work too well when I caught an exception in an ISR.
I found this macro:
_ISR_Is_in_progress
Which I can use to detect if the exception handler is running in an ISR. Is that a good enough way to detect that the code is running in the context of an ISR? Or is there a better/more standard way?
bool rtems_interrupt_is_in_progress( void );
Another option would be to have a high priority exception task running, just waiting to handle the exception clean up activity. The exception handler could use a semaphore to kick off the task. Thanks, Alan _______________________________________________ rtems-users mailing list rtems...@rtems.org http://www.rtems.org/mailman/listinfo/rtems-users
-- Joel Sherrill, Ph.D. Director of Research& Development joel.s...@OARcorp.com On-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available (256) 722-9985
On 03/28/2012 10:48 AM, Cudmore, Alan P. (GSFC-5820) wrote:On our RTEMS 4.10 project ( m68k/coldfire ), I have an exception handler that does a number of things such as closing files before restarting our processor card. This works fine when a task has an exception, but did not work too well when I caught an exception in an ISR. I found this macro: _ISR_Is_in_progress Which I can use to detect if the exception handler is running in an ISR. Is that a good enough way to detect that the code is running in the context of an ISR? Or is there a better/more standard way?
http://www.rtems.org/onlinedocs/releases/rtemsdocs-4.10.2/share/rtems/html/c_user/c_user00106.html
bool rtems_interrupt_is_in_progress( void );
:)
On Mar 28, 2012, at 12:52 PM, Joel Sherrill wrote:
On 03/28/2012 10:48 AM, Cudmore, Alan P. (GSFC-5820) wrote:On our RTEMS 4.10 project ( m68k/coldfire ), I have an exception handler that does a number of things such as closing files before restarting our processor card. This works fine when a task has an exception, but did not work too well when I caught an exception in an ISR. I found this macro: _ISR_Is_in_progress Which I can use to detect if the exception handler is running in an ISR. Is that a good enough way to detect that the code is running in the context of an ISR? Or is there a better/more standard way?
http://www.rtems.org/onlinedocs/releases/rtemsdocs-4.10.2/share/rtems/html/c_user/c_user00106.html
bool rtems_interrupt_is_in_progress( void );
:)
Just what I was looking for , thanks!
I guess I should stop using "grep" as my manual :)