Detecting when running in an ISR ?
joel.sherrill at OARcorp.com
Wed Mar 28 12:18:05 CDT 2012
On 03/28/2012 11:57 AM, Cudmore, Alan P. (GSFC-5820) wrote:
> 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:
>>> 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 );
> Just what I was looking for , thanks!
> I guess I should stop using "grep" as my manual :)
I was just thrilled to answer an "Alan question" with a link to a manual.
You usually have much harder questions. :)
>>> 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.
>>> rtems-users mailing list
>>> rtems-users at rtems.org
>> Joel Sherrill, Ph.D. Director of Research& Development
>> joel.sherrill at OARcorp.com On-Line Applications Research
>> Ask me about RTEMS: a free RTOS Huntsville AL 35805
>> Support Available (256) 722-9985
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rtems-users