<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 28, 2012, at 12:52 PM, Joel Sherrill wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<div text="#000000" bgcolor="#FFFFFF">
On 03/28/2012 10:48 AM, Cudmore, Alan P. (GSFC-5820) wrote:
<blockquote cite="mid:A3A054C4-41C1-41A2-A84C-DB7B6171960D@nasa.gov" type="cite">
<pre wrap="">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?
</pre>
</blockquote>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a href="http://www.rtems.org/onlinedocs/releases/rtemsdocs-4.10.2/share/rtems/html/c_user/c_user00106.html">http://www.rtems.org/onlinedocs/releases/rtemsdocs-4.10.2/share/rtems/html/c_user/c_user00106.html</a><br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<dl style="color: rgb(0, 0, 0); font-family: 'Times New Roman';
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); font-size: medium; ">
<dd>
<pre>bool rtems_interrupt_is_in_progress( void );
</pre>
</dd>
</dl>
<br class="Apple-interchange-newline">
:)<br></div></blockquote><div><br></div><div>Just what I was looking for , thanks!</div><div><br></div><div>I guess I should stop using "grep" as my manual :)</div><div><br></div><div>Alan</div><div><br></div><br><blockquote type="cite"><div text="#000000" bgcolor="#FFFFFF">
<br>
<blockquote cite="mid:A3A054C4-41C1-41A2-A84C-DB7B6171960D@nasa.gov" type="cite">
<pre wrap="">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
<a class="moz-txt-link-abbreviated" href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a>
<a class="moz-txt-link-freetext" href="http://www.rtems.org/mailman/listinfo/rtems-users">http://www.rtems.org/mailman/listinfo/rtems-users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Joel Sherrill, Ph.D. Director of Research& Development
<a class="moz-txt-link-abbreviated" href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a> On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
</pre>
</div>
</blockquote></div><br></body></html>