<div dir="ltr">Thanks a lot. Is it safe to assume every program will, at some point, call _Terminate? (unless of course it's running indefinitely)<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 16, 2014 at 4:08 AM, Sebastian Huber <span dir="ltr"><<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 2014-06-13 19:56, Martin Galvan wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello everyone! I'm currently trying to figure out the "life cycle" of a<br>
classic API task, so to speak. I've noticed single-task applications (such as<br>
the hello.exe example) end after a call to _User_extensions_Thread_<br>
exitted (which in turn ends up in a call to _Terminate), however I'm not sure<br>
how tasks such as in ticker.exe end. I need to know the exact point in which<br>
the program ends (by that I mean where the program finishes executing and RTEMS<br>
starts cleaning up and calls _Terminate).<br>
</blockquote>
<br></div></div>
You can terminate the program with a call to exit().  You can also use atexit() handlers.<br>
<br>
To catch all program termination paths in RTEMS you can use the fatal error extension.<br>
<br>
<a href="http://www.rtems.org/onlinedocs/doxygen/cpukit/html/group__ScoreUserExt.html#ga04bf84979c777ddf2507923f57b554dd" target="_blank">http://www.rtems.org/<u></u>onlinedocs/doxygen/cpukit/<u></u>html/group__ScoreUserExt.html#<u></u>ga04bf84979c777ddf2507923f57b5<u></u>54dd</a><br>

<br>
The life cycle events for threads are covered with the create, start, restart, begin, exitted, delete and terminate extension.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Sebastian Huber, embedded brains GmbH<br>
<br>
Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
Phone   : +49 89 189 47 41-16<br>
Fax     : +49 89 189 47 41-09<br>
E-Mail  : <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-<u></u>brains.de</a><br>
PGP     : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:16px;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><a href="http://www.tallertechnologies.com" target="_blank"><img alt="http://www.tallertechnologies.com" src="http://www.tallertechnologies.com/templates/tallertechnologies/images/signature.png" height="78" width="200"></a><br>
</span></p><br><span style="font-size:16px;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="font-size:13px;font-family:Verdana;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Martín Galván</span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="font-size:13px;font-family:Verdana;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Software Engineer</span></p>
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13px;font-family:Verdana;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Taller Technologies Argentina</span></p>
<br><span style="font-size:13px;font-family:Verdana;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="font-size:11px;font-family:Verdana;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">San Lorenzo 47, 3rd Floor, Office 5</span></p>
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;font-family:Verdana;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Córdoba, Argentina</span></p>
<span style="font-size:11px;font-family:Verdana;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Phone</span><span style="font-size:11px;font-family:Verdana;color:#000000;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">:</span><span style="font-size:11px;font-family:Verdana;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"> 54 351 4217888 / +54 351 4218211<br>
<br></span><a href="http://www.linkedin.com/company/taller-technologies" target="_blank"><img alt="http://www.linkedin.com/company/taller-technologies" src="https://lh5.googleusercontent.com/HKO5GBPx_vJXBTw6PU11wmgL_ihNilm4Aad1jKRw0bz0oT0UQPbi6v-HqhVeOmtB4wXvRJ1c4DrKDFd3XSniQ6DE1ti1JgoWqnwIiE1pJF00BCM9_xGUWOz1KOkYypGI4Q" style="border:none" height="20px;" width="20px;"></a><a href="https://www.facebook.com/tallertechnologies" target="_blank"><img alt="https://www.facebook.com/tallertechnologies" src="https://lh5.googleusercontent.com/qvfbaChUzbrLU08lLILX4YIFIFED2DFX4hnSmimWM3yI94j4xZqgAVsoRxyw8cq2dVl6CQTcXwqk_VS283mCEFV-y1z65NNCfFYM-cWWzP4duMSEBPPE5ymmbLgabWMX4w" style="border:none" height="19px;" width="19px;"></a><br>
</div>
</div>