Commits

Anonymous committed 79e6e06

Saves and restores fp environment. Updated documentation. Fixes to the make files.

Comments (0)

Files changed (76)

  *  registered as a coroutine. Also, a coroutine should never return normally.
  */
 #define CR_THREAD_INIT( )                                               \
+            static fenv_t envp;                                         \
             static cr_id_t this_id__;                                   \
             this_id__ = cr_g_current_cr_id;                             \
             if ( !setjmp( cr_g_context[ this_id__ ].env ) ) {           \
+                fegetenv( &envp );                                      \
                 longjmp( cr_g_reg_func_env, SETJMP_DFLT_RET_VAL );      \
-            } else { /* explicit block for the longjmp */ ; }
+            } else { fesetenv( &envp ); }
 
 /** \brief Starts the cr_lib system
  *
             assert( ( cr_g_current_cr_id != this_id__ ) && "CR_YIELD: recursive coroutine call!\n" );           \
             cr_g_previous_cr_id = this_id__;                                                                    \
             if ( !setjmp( cr_g_context[ this_id__ ].env ) ) {                                                   \
+                fegetenv( &envp );                                                                              \
                 longjmp( cr_g_context[ cr_g_current_cr_id ].env, SETJMP_DFLT_RET_VAL );                         \
-            } else {  /* explicit block for the longjmp */ ; }
+            } else { fesetenv( &envp ); }
 
 
 

doxygen/html/annotated.html

-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 <title>cr_lib: Data Structures</title>
-<link href="tabs.css" rel="stylesheet" type="text/css">
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.5.8 -->
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+<!-- Generated by Doxygen 1.7.1 -->
 <div class="navigation" id="top">
   <div class="tabs">
-    <ul>
+    <ul class="tablist">
       <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
       <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
       <li><a href="files.html"><span>Files</span></a></li>
       <li><a href="examples.html"><span>Examples</span></a></li>
     </ul>
   </div>
-  <div class="tabs">
-    <ul>
+  <div class="tabs2">
+    <ul class="tablist">
       <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
     </ul>
   </div>
 </div>
+<div class="header">
+  <div class="headertitle">
+<h1>Data Structures</h1>  </div>
+</div>
 <div class="contents">
-<h1>Data Structures</h1>Here are the data structures with brief descriptions:<table>
+Here are the data structures with brief descriptions:<table>
   <tr><td class="indexkey"><a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a></td><td class="indexvalue">Coroutine context information </td></tr>
+  <tr><td class="indexkey"><a class="el" href="structpthread__once__t__.html">pthread_once_t_</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><a class="el" href="structptw32__cleanup__t.html">ptw32_cleanup_t</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><a class="el" href="structptw32__handle__t.html">ptw32_handle_t</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><a class="el" href="structsched__param.html">sched_param</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><a class="el" href="structtimespec.html">timespec</a></td><td class="indexvalue"></td></tr>
 </table>
 </div>
-<hr size="1"><address style="text-align: right;"><small>Generated on Fri May 28 09:13:09 2010 for cr_lib by&nbsp;
+<hr class="footer"/><address class="footer"><small>Generated on Fri Jun 25 2010 09:38:58 for cr_lib by&nbsp;
 <a href="http://www.doxygen.org/index.html">
-<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
+<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
 </body>
 </html>

doxygen/html/bc_s.png

Added
New image

doxygen/html/classes.html

-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 <title>cr_lib: Alphabetical List</title>
-<link href="tabs.css" rel="stylesheet" type="text/css">
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.5.8 -->
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+<!-- Generated by Doxygen 1.7.1 -->
 <div class="navigation" id="top">
   <div class="tabs">
-    <ul>
+    <ul class="tablist">
       <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
       <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
       <li><a href="files.html"><span>Files</span></a></li>
       <li><a href="examples.html"><span>Examples</span></a></li>
     </ul>
   </div>
-  <div class="tabs">
-    <ul>
+  <div class="tabs2">
+    <ul class="tablist">
       <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
     </ul>
   </div>
 </div>
+<div class="header">
+  <div class="headertitle">
+<h1>Data Structure Index</h1>  </div>
+</div>
 <div class="contents">
-<h1>Data Structure Index</h1><p><div class="qindex"><a class="qindex" href="#letter_C">C</a></div><p>
+<div class="qindex"><a class="qindex" href="#letter_C">C</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_P">P</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_S">S</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_T">T</a></div>
 <table align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
 <tr><td><a name="letter_C"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;C&nbsp;&nbsp;</div></td></tr></table>
-</td><td><a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a>&nbsp;&nbsp;&nbsp;</td></tr></table><p><div class="qindex"><a class="qindex" href="#letter_C">C</a></div><p>
+</td><td><a name="letter_P"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;P&nbsp;&nbsp;</div></td></tr></table>
+</td><td><a class="el" href="structptw32__cleanup__t.html">ptw32_cleanup_t</a>&nbsp;&nbsp;&nbsp;</td><td><a name="letter_S"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;S&nbsp;&nbsp;</div></td></tr></table>
+</td><td><a name="letter_T"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;T&nbsp;&nbsp;</div></td></tr></table>
+</td></tr><tr><td><a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="structpthread__once__t__.html">pthread_once_t_</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="structptw32__handle__t.html">ptw32_handle_t</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="structsched__param.html">sched_param</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="structtimespec.html">timespec</a>&nbsp;&nbsp;&nbsp;</td></tr></table><div class="qindex"><a class="qindex" href="#letter_C">C</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_P">P</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_S">S</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_T">T</a></div>
 </div>
-<hr size="1"><address style="text-align: right;"><small>Generated on Fri May 28 09:13:09 2010 for cr_lib by&nbsp;
+<hr class="footer"/><address class="footer"><small>Generated on Fri Jun 25 2010 09:38:58 for cr_lib by&nbsp;
 <a href="http://www.doxygen.org/index.html">
-<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
+<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
 </body>
 </html>

doxygen/html/closed.png

Added
New image

doxygen/html/cr_8c.html

-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 <title>cr_lib: cr.c File Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css">
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.5.8 -->
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+<!-- Generated by Doxygen 1.7.1 -->
 <div class="navigation" id="top">
   <div class="tabs">
-    <ul>
+    <ul class="tablist">
       <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
       <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
       <li class="current"><a href="files.html"><span>Files</span></a></li>
       <li><a href="examples.html"><span>Examples</span></a></li>
     </ul>
   </div>
-  <div class="tabs">
-    <ul>
+  <div class="tabs2">
+    <ul class="tablist">
       <li><a href="files.html"><span>File&nbsp;List</span></a></li>
       <li><a href="globals.html"><span>Globals</span></a></li>
     </ul>
   </div>
 </div>
+<div class="header">
+  <div class="summary">
+<a href="#enum-members">Enumerations</a> &#124;
+<a href="#func-members">Functions</a> &#124;
+<a href="#var-members">Variables</a>  </div>
+  <div class="headertitle">
+<h1>cr.c File Reference</h1>  </div>
+</div>
 <div class="contents">
-<h1>cr.c File Reference</h1><code>#include &lt;stdlib.h&gt;</code><br>
-<code>#include &lt;string.h&gt;</code><br>
-<code>#include &lt;stdio.h&gt;</code><br>
-<code>#include &lt;stdbool.h&gt;</code><br>
-<code>#include &lt;signal.h&gt;</code><br>
-<code>#include &quot;<a class="el" href="cr__config_8h-source.html">cr_config.h</a>&quot;</code><br>
-<code>#include &quot;<a class="el" href="cr_8h-source.html">cr.h</a>&quot;</code><br>
+<code>#include &lt;stdlib.h&gt;</code><br/>
+<code>#include &lt;string.h&gt;</code><br/>
+<code>#include &lt;stdio.h&gt;</code><br/>
+<code>#include &lt;stdbool.h&gt;</code><br/>
+<code>#include &lt;signal.h&gt;</code><br/>
+<code>#include &quot;<a class="el" href="cr__config_8h_source.html">cr_config.h</a>&quot;</code><br/>
+<code>#include &quot;<a class="el" href="cr_8h_source.html">cr.h</a>&quot;</code><br/>
 
-<p>
-<div class="dynheader">
-Include dependency graph for cr.c:</div>
-<div class="dynsection">
-</div>
+<p><a href="cr_8c_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr><td colspan="2"><h2><a name="enum-members"></a>
+Enumerations</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="cr_8c.html#a06fc87d81c62e9abb8790b6e5713c55ba84eb6a791d344cea4fadd2638f7b460e">CR_ERROR_CR_EXITING</a> =  0
+ }</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Internally used annonymous enumerations that define various states and settings. </p>
+ <a href="cr_8c.html#a06fc87d81c62e9abb8790b6e5713c55b">More...</a><br/></td></tr>
+<tr><td colspan="2"><h2><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#a3e7a31163658d81c9473e5b637d9eb90">cr_get_id</a> (void(*pFunc)(void))</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find the ID of a coroutine.  <a href="#a3e7a31163658d81c9473e5b637d9eb90"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#a3e8d6963f6ee2cc49502186eca21d879">cr_reset</a> (void)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets the system to an initial state.  <a href="#a3e8d6963f6ee2cc49502186eca21d879"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#aca6b87323f9ce0bf21b3f06209a97989">cr_init</a> (<a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a> *cr_context, size_t cr_context_count)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">cr_lib's initialization function.  <a href="#aca6b87323f9ce0bf21b3f06209a97989"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#accd73b48023970380bfdecb56483976c">cr_idle</a> (void)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The internal system's coroutine thread.  <a href="#accd73b48023970380bfdecb56483976c"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#ae30bdb4ef569c0678e4cb49829f11bbb">cr_register_thread</a> (void(*pFunc)(void))</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Register a function as a coroutine thread.  <a href="#ae30bdb4ef569c0678e4cb49829f11bbb"></a><br/></td></tr>
+<tr><td colspan="2"><h2><a name="var-members"></a>
+Variables</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1374fdc17d74ee4b6e94c63251886ea3"></a><!-- doxytag: member="cr.c::cr_g_reg_func_env" ref="a1374fdc17d74ee4b6e94c63251886ea3" args="" -->
+jmp_buf&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_g_reg_func_env</b></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#a22841ff791649abd0bcb62392ebb9778">cr_g_context</a> = 0</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pointer to the user defined array of coroutine contexts.  <a href="#a22841ff791649abd0bcb62392ebb9778"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#a8238e77b653b2cc4905373b805fc3567">cr_g_context_cnt</a> = 0</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The number of elements in the coroutine context array.  <a href="#a8238e77b653b2cc4905373b805fc3567"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1345c6db4d2d1d939e7841da46704d8e"></a><!-- doxytag: member="cr.c::cr_g_activate_id" ref="a1345c6db4d2d1d939e7841da46704d8e" args="" -->
+<a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#a1345c6db4d2d1d939e7841da46704d8e">cr_g_activate_id</a> = CR_IDLE_THREAD_ID</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Holds the ID of the coroutine to be activated - by cr_idle. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#a00999e3368c59592db0c069abf1f1296">cr_g_sys_started</a> = false</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flag that's set when CR_START is called.  <a href="#a00999e3368c59592db0c069abf1f1296"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#acf4ab64c8de56045d84e53b65dba7eb8">cr_g_current_cr_id</a> = CR_IDLE_THREAD_ID</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The ID of the coroutine that's active.  <a href="#acf4ab64c8de56045d84e53b65dba7eb8"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#ae7e93574baec3ae2b083c7f36916fbbd">cr_g_previous_cr_id</a> = CR_IDLE_THREAD_ID</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The ID of the previously active coroutine.  <a href="#ae7e93574baec3ae2b083c7f36916fbbd"></a><br/></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<dl class="author"><dt><b>Author:</b></dt><dd>Original author : Joseph D Poirier </dd></dl>
+<dl class="date"><dt><b>Date:</b></dt><dd>Creation date : February 2006</dd></dl>
+<dl class="version"><dt><b>Version:</b></dt><dd>X.X.X</dd></dl>
+<p>VERSION DATE/AUTHOR COMMENT</p>
+<p>LICENSE: see the license.txt file</p>
+<p>&lt;&lt;PRJ% PFE%&gt;&gt; </p>
 
-<p>
-<a href="cr_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="cr_8c.html#06fc87d81c62e9abb8790b6e5713c55b84eb6a791d344cea4fadd2638f7b460e">CR_ERROR_CR_EXITING</a> =  0
- }</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internally used annonymous enumerations that define various states and settings.  <a href="cr_8c.html#06fc87d81c62e9abb8790b6e5713c55b">More...</a><br></td></tr>
-<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#3e7a31163658d81c9473e5b637d9eb90">cr_get_id</a> (void(*pFunc)(void))</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find the ID of a coroutine.  <a href="#3e7a31163658d81c9473e5b637d9eb90"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#3e8d6963f6ee2cc49502186eca21d879">cr_reset</a> (void)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets the system to an initial state.  <a href="#3e8d6963f6ee2cc49502186eca21d879"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#ca6b87323f9ce0bf21b3f06209a97989">cr_init</a> (<a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a> *cr_context, size_t cr_context_count)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">cr_lib's initialization function.  <a href="#ca6b87323f9ce0bf21b3f06209a97989"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#ccd73b48023970380bfdecb56483976c">cr_idle</a> (void)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The internal system's coroutine thread.  <a href="#ccd73b48023970380bfdecb56483976c"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#e30bdb4ef569c0678e4cb49829f11bbb">cr_register_thread</a> (void(*pFunc)(void))</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Register a function as a coroutine thread.  <a href="#e30bdb4ef569c0678e4cb49829f11bbb"></a><br></td></tr>
-<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1374fdc17d74ee4b6e94c63251886ea3"></a><!-- doxytag: member="cr.c::cr_g_reg_func_env" ref="1374fdc17d74ee4b6e94c63251886ea3" args="" -->
-jmp_buf&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_g_reg_func_env</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#22841ff791649abd0bcb62392ebb9778">cr_g_context</a> = 0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pointer to the user defined array of coroutine contexts.  <a href="#22841ff791649abd0bcb62392ebb9778"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#8238e77b653b2cc4905373b805fc3567">cr_g_context_cnt</a> = 0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The number of elements in the coroutine context array.  <a href="#8238e77b653b2cc4905373b805fc3567"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1345c6db4d2d1d939e7841da46704d8e"></a><!-- doxytag: member="cr.c::cr_g_activate_id" ref="1345c6db4d2d1d939e7841da46704d8e" args="" -->
-<a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#1345c6db4d2d1d939e7841da46704d8e">cr_g_activate_id</a> = CR_IDLE_THREAD_ID</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Holds the ID of the coroutine to be activated - by cr_idle. <br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#00999e3368c59592db0c069abf1f1296">cr_g_sys_started</a> = 0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flag that's set when CR_START is called.  <a href="#00999e3368c59592db0c069abf1f1296"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#cf4ab64c8de56045d84e53b65dba7eb8">cr_g_current_cr_id</a> = CR_IDLE_THREAD_ID</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The ID of the coroutine that's active.  <a href="#cf4ab64c8de56045d84e53b65dba7eb8"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8c.html#e7e93574baec3ae2b083c7f36916fbbd">cr_g_previous_cr_id</a> = CR_IDLE_THREAD_ID</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The ID of the previously active coroutine.  <a href="#e7e93574baec3ae2b083c7f36916fbbd"></a><br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-<dl class="author" compact><dt><b>Author:</b></dt><dd>Original author : Joseph D Poirier </dd></dl>
-<dl class="date" compact><dt><b>Date:</b></dt><dd>Creation date : February 2006</dd></dl>
-<dl class="version" compact><dt><b>Version:</b></dt><dd>X.X.X</dd></dl>
-VERSION DATE/AUTHOR COMMENT<p>
-LICENSE: see the license.txt file<p>
-&lt;&lt;PRJ% PFE%&gt;&gt; 
-<p>Definition in file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
-<hr><h2>Enumeration Type Documentation</h2>
-<a class="anchor" name="06fc87d81c62e9abb8790b6e5713c55b"></a><!-- doxytag: member="cr.c::@0" ref="06fc87d81c62e9abb8790b6e5713c55b" args="" -->
+<p>Definition in file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>
+<hr/><h2>Enumeration Type Documentation</h2>
+<a class="anchor" id="a06fc87d81c62e9abb8790b6e5713c55b"></a><!-- doxytag: member="cr.c::@0" ref="a06fc87d81c62e9abb8790b6e5713c55b" args="" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">anonymous enum          </td>
+          <td class="memname">anonymous enum</td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
-<p>
-Internally used annonymous enumerations that define various states and settings. 
-<p>
-<dl class="note" compact><dt><b>Note:</b></dt><dd>For internal use only. </dd></dl>
-<dl compact><dt><b>Enumerator: </b></dt><dd>
-<table border="0" cellspacing="2" cellpadding="0">
-<tr><td valign="top"><em><a class="anchor" name="06fc87d81c62e9abb8790b6e5713c55b84eb6a791d344cea4fadd2638f7b460e"></a><!-- doxytag: member="CR_ERROR_CR_EXITING" ref="06fc87d81c62e9abb8790b6e5713c55b84eb6a791d344cea4fadd2638f7b460e" args="" -->CR_ERROR_CR_EXITING</em>&nbsp;</td><td>
-Used in asserts for clarity </td></tr>
+<p>Internally used annonymous enumerations that define various states and settings. </p>
+<dl class="note"><dt><b>Note:</b></dt><dd>For internal use only. </dd></dl>
+<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
+<tr><td valign="top"><em><a class="anchor" id="a06fc87d81c62e9abb8790b6e5713c55ba84eb6a791d344cea4fadd2638f7b460e"></a><!-- doxytag: member="CR_ERROR_CR_EXITING" ref="a06fc87d81c62e9abb8790b6e5713c55ba84eb6a791d344cea4fadd2638f7b460e" args="" -->CR_ERROR_CR_EXITING</em>&nbsp;</td><td>
+<p>Used in asserts for clarity </p>
+</td></tr>
 </table>
+</dd>
 </dl>
 
-<p>Definition at line <a class="el" href="cr_8c-source.html#l00155">155</a> of file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
+<p>Definition at line <a class="el" href="cr_8c_source.html#l00155">155</a> of file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>
 
 </div>
-</div><p>
-<hr><h2>Function Documentation</h2>
-<a class="anchor" name="3e7a31163658d81c9473e5b637d9eb90"></a><!-- doxytag: member="cr.c::cr_get_id" ref="3e7a31163658d81c9473e5b637d9eb90" args="(void(*pFunc)(void))" -->
+</div>
+<hr/><h2>Function Documentation</h2>
+<a class="anchor" id="a3e7a31163658d81c9473e5b637d9eb90"></a><!-- doxytag: member="cr.c::cr_get_id" ref="a3e7a31163658d81c9473e5b637d9eb90" args="(void(*pFunc)(void))" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname"><a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a> cr_get_id           </td>
+          <td class="memname"><a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a> cr_get_id </td>
           <td>(</td>
           <td class="paramtype">void(*)(void)&nbsp;</td>
-          <td class="paramname"> <em>pFunc</em>          </td>
+          <td class="paramname"> <em>pFunc</em></td>
           <td>&nbsp;)&nbsp;</td>
           <td></td>
         </tr>
 </div>
 <div class="memdoc">
 
-<p>
-Find the ID of a coroutine. 
-<p>
-Returns the ID of a registered coroutine.<p>
-<dl compact><dt><b>Parameters:</b></dt><dd>
+<p>Find the ID of a coroutine. </p>
+<p>Returns the ID of a registered coroutine.</p>
+<dl><dt><b>Parameters:</b></dt><dd>
   <table border="0" cellspacing="2" cellpadding="0">
     <tr><td valign="top"></td><td valign="top"><em>pFunc</em>&nbsp;</td><td>the registered coroutine whose ID is requested </td></tr>
   </table>
+  </dd>
 </dl>
-<dl compact><dt><b>Return values:</b></dt><dd>
+<dl><dt><b>Return values:</b></dt><dd>
   <table border="0" cellspacing="2" cellpadding="0">
     <tr><td valign="top"></td><td valign="top"><em>CR_INVALID_ID</em>&nbsp;</td><td>when no ID is found </td></tr>
     <tr><td valign="top"></td><td valign="top"><em>id</em>&nbsp;</td><td>a valid coroutine's ID </td></tr>
   </table>
+  </dd>
 </dl>
-<dl compact><dt><b>Examples: </b></dt><dd>
-<a class="el" href="demo__2_8c-example.html#a2">demo_2.c</a>, and <a class="el" href="demo__4_8c-example.html#a1">demo_4.c</a>.</dl>
-<p>Definition at line <a class="el" href="cr_8c-source.html#l00203">203</a> of file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="demo__2_8c-example.html#a2">demo_2.c</a>, and <a class="el" href="demo__4_8c-example.html#a3">demo_4.c</a>.</dd>
+</dl>
+<p>Definition at line <a class="el" href="cr_8c_source.html#l00203">203</a> of file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>
 
 </div>
-</div><p>
-<a class="anchor" name="ccd73b48023970380bfdecb56483976c"></a><!-- doxytag: member="cr.c::cr_idle" ref="ccd73b48023970380bfdecb56483976c" args="(void)" -->
+</div>
+<a class="anchor" id="accd73b48023970380bfdecb56483976c"></a><!-- doxytag: member="cr.c::cr_idle" ref="accd73b48023970380bfdecb56483976c" args="(void)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">void cr_idle           </td>
+          <td class="memname">void cr_idle </td>
           <td>(</td>
           <td class="paramtype">void&nbsp;</td>
-          <td class="paramname">          </td>
+          <td class="paramname"></td>
           <td>&nbsp;)&nbsp;</td>
           <td></td>
         </tr>
 </div>
 <div class="memdoc">
 
-<p>
-The internal system's coroutine thread. 
-<p>
-This coroutine thread is used in conjunction with the cr_g_activate_id variable. cr_g_activate_id can be set to a coroutine's ID, e.g. in an ISR handler, and this function will activate the coroutine. This will work only if this function is explicitly called via CR_YIELD.<p>
-<dl class="attention" compact><dt><b>Attention:</b></dt><dd>This coroutine thread must be explicitly called for it to run. </dd></dl>
-<dl compact><dt><b>Examples: </b></dt><dd>
-<a class="el" href="demo__2_8c-example.html#a5">demo_2.c</a>, and <a class="el" href="demo__4_8c-example.html#a5">demo_4.c</a>.</dl>
-<p>Definition at line <a class="el" href="cr_8c-source.html#l00270">270</a> of file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
-
-<p>
-<div class="dynheader">
-Here is the caller graph for this function:</div>
-<div class="dynsection">
-</div>
+<p>The internal system's coroutine thread. </p>
+<p>This coroutine thread is used in conjunction with the cr_g_activate_id variable. cr_g_activate_id can be set to a coroutine's ID, e.g. in an ISR handler, and this function will activate the coroutine. This will work only if this function is explicitly called via CR_YIELD.</p>
+<dl class="attention"><dt><b>Attention:</b></dt><dd>This coroutine thread must be explicitly called for it to run. </dd></dl>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="demo__2_8c-example.html#a5">demo_2.c</a>, and <a class="el" href="demo__4_8c-example.html#a7">demo_4.c</a>.</dd>
+</dl>
+<p>Definition at line <a class="el" href="cr_8c_source.html#l00270">270</a> of file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>
 
 </div>
-</div><p>
-<a class="anchor" name="ca6b87323f9ce0bf21b3f06209a97989"></a><!-- doxytag: member="cr.c::cr_init" ref="ca6b87323f9ce0bf21b3f06209a97989" args="(CR_CONTEXT *cr_context, size_t cr_context_count)" -->
+</div>
+<a class="anchor" id="aca6b87323f9ce0bf21b3f06209a97989"></a><!-- doxytag: member="cr.c::cr_init" ref="aca6b87323f9ce0bf21b3f06209a97989" args="(CR_CONTEXT *cr_context, size_t cr_context_count)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">void cr_init           </td>
+          <td class="memname">void cr_init </td>
           <td>(</td>
           <td class="paramtype"><a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a> *&nbsp;</td>
           <td class="paramname"> <em>cr_context</em>, </td>
 </div>
 <div class="memdoc">
 
-<p>
-cr_lib's initialization function. 
-<p>
-This function sets a global pointer to the array holding all of the registered coroutines context information, as well as, the element count of the array.<p>
-<dl compact><dt><b>Parameters:</b></dt><dd>
+<p>cr_lib's initialization function. </p>
+<p>This function sets a global pointer to the array holding all of the registered coroutines context information, as well as, the element count of the array.</p>
+<dl><dt><b>Parameters:</b></dt><dd>
   <table border="0" cellspacing="2" cellpadding="0">
     <tr><td valign="top"></td><td valign="top"><em>cr_context</em>&nbsp;</td><td>the context array </td></tr>
     <tr><td valign="top"></td><td valign="top"><em>cr_context_count</em>&nbsp;</td><td>the element count of the array </td></tr>
   </table>
+  </dd>
 </dl>
-<dl class="attention" compact><dt><b>Attention:</b></dt><dd>This initialization function must be the first function called in the library. </dd></dl>
-<dl compact><dt><b>Examples: </b></dt><dd>
-<a class="el" href="demo__1_8c-example.html#a4">demo_1.c</a>, <a class="el" href="demo__2_8c-example.html#a8">demo_2.c</a>, <a class="el" href="demo__3_8c-example.html#a4">demo_3.c</a>, and <a class="el" href="demo__4_8c-example.html#a8">demo_4.c</a>.</dl>
-<p>Definition at line <a class="el" href="cr_8c-source.html#l00245">245</a> of file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
-
-<p>
-<div class="dynheader">
-Here is the call graph for this function:</div>
-<div class="dynsection">
-</div>
+<dl class="attention"><dt><b>Attention:</b></dt><dd>This initialization function must be the first function called in the library. </dd></dl>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="demo__1_8c-example.html#a4">demo_1.c</a>, <a class="el" href="demo__2_8c-example.html#a8">demo_2.c</a>, <a class="el" href="demo__3_8c-example.html#a4">demo_3.c</a>, and <a class="el" href="demo__4_8c-example.html#a10">demo_4.c</a>.</dd>
+</dl>
+<p>Definition at line <a class="el" href="cr_8c_source.html#l00245">245</a> of file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>
 
 </div>
-</div><p>
-<a class="anchor" name="e30bdb4ef569c0678e4cb49829f11bbb"></a><!-- doxytag: member="cr.c::cr_register_thread" ref="e30bdb4ef569c0678e4cb49829f11bbb" args="(void(*pFunc)(void))" -->
+</div>
+<a class="anchor" id="ae30bdb4ef569c0678e4cb49829f11bbb"></a><!-- doxytag: member="cr.c::cr_register_thread" ref="ae30bdb4ef569c0678e4cb49829f11bbb" args="(void(*pFunc)(void))" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname"><a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a> cr_register_thread           </td>
+          <td class="memname"><a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a> cr_register_thread </td>
           <td>(</td>
           <td class="paramtype">void(*)(void)&nbsp;</td>
-          <td class="paramname"> <em>pFunc</em>          </td>
+          <td class="paramname"> <em>pFunc</em></td>
           <td>&nbsp;)&nbsp;</td>
           <td></td>
         </tr>
 </div>
 <div class="memdoc">
 
-<p>
-Register a function as a coroutine thread. 
-<p>
-This function creates an ID for the new coroutine thread and associates the ID with a context element. Information about the coroutine is set in the context element. cr_g_current_cr_id is set to the new coroutine's ID. The cr_register_thread function's context is saved and the user function is called. The CR_THREAD_INIT macro performs a longjmp back to this function using the previously saved context. The cr_g_sys_started flag is checked to determine if a user coroutine has exited via the function's epilog code.<p>
-<dl compact><dt><b>Parameters:</b></dt><dd>
+<p>Register a function as a coroutine thread. </p>
+<p>This function creates an ID for the new coroutine thread and associates the ID with a context element. Information about the coroutine is set in the context element. cr_g_current_cr_id is set to the new coroutine's ID. The cr_register_thread function's context is saved and the user function is called. The CR_THREAD_INIT macro performs a longjmp back to this function using the previously saved context. The cr_g_sys_started flag is checked to determine if a user coroutine has exited via the function's epilog code.</p>
+<dl><dt><b>Parameters:</b></dt><dd>
   <table border="0" cellspacing="2" cellpadding="0">
     <tr><td valign="top"></td><td valign="top"><em>pFunc</em>&nbsp;</td><td>the function to be registered </td></tr>
   </table>
+  </dd>
 </dl>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>The ID of the registered coroutine. </dd></dl>
-<dl class="attention" compact><dt><b>Attention:</b></dt><dd>All coroutine thread registration must be completed before calling CR_START. </dd></dl>
-<dl compact><dt><b>Examples: </b></dt><dd>
-<a class="el" href="demo__1_8c-example.html#a5">demo_1.c</a>, <a class="el" href="demo__2_8c-example.html#a9">demo_2.c</a>, <a class="el" href="demo__3_8c-example.html#a5">demo_3.c</a>, and <a class="el" href="demo__4_8c-example.html#a9">demo_4.c</a>.</dl>
-<p>Definition at line <a class="el" href="cr_8c-source.html#l00317">317</a> of file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
-
-<p>
-<div class="dynheader">
-Here is the call graph for this function:</div>
-<div class="dynsection">
-</div>
-
-<p>
-<div class="dynheader">
-Here is the caller graph for this function:</div>
-<div class="dynsection">
-</div>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The ID of the registered coroutine. </dd></dl>
+<dl class="attention"><dt><b>Attention:</b></dt><dd>All coroutine thread registration must be completed before calling CR_START. </dd></dl>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="demo__1_8c-example.html#a5">demo_1.c</a>, <a class="el" href="demo__2_8c-example.html#a9">demo_2.c</a>, <a class="el" href="demo__3_8c-example.html#a5">demo_3.c</a>, and <a class="el" href="demo__4_8c-example.html#a11">demo_4.c</a>.</dd>
+</dl>
+<p>Definition at line <a class="el" href="cr_8c_source.html#l00317">317</a> of file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>
 
 </div>
-</div><p>
-<a class="anchor" name="3e8d6963f6ee2cc49502186eca21d879"></a><!-- doxytag: member="cr.c::cr_reset" ref="3e8d6963f6ee2cc49502186eca21d879" args="(void)" -->
+</div>
+<a class="anchor" id="a3e8d6963f6ee2cc49502186eca21d879"></a><!-- doxytag: member="cr.c::cr_reset" ref="a3e8d6963f6ee2cc49502186eca21d879" args="(void)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">void cr_reset           </td>
+          <td class="memname">void cr_reset </td>
           <td>(</td>
           <td class="paramtype">void&nbsp;</td>
-          <td class="paramname">          </td>
+          <td class="paramname"></td>
           <td>&nbsp;)&nbsp;</td>
           <td></td>
         </tr>
 </div>
 <div class="memdoc">
 
-<p>
-Resets the system to an initial state. 
-<p>
-This function sets all the system's global variables to their original state. <dl compact><dt><b>Examples: </b></dt><dd>
-<a class="el" href="demo__1_8c-example.html#a2">demo_1.c</a>, <a class="el" href="demo__2_8c-example.html#a6">demo_2.c</a>, <a class="el" href="demo__3_8c-example.html#a2">demo_3.c</a>, and <a class="el" href="demo__4_8c-example.html#a6">demo_4.c</a>.</dl>
-<p>Definition at line <a class="el" href="cr_8c-source.html#l00225">225</a> of file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
+<p>Resets the system to an initial state. </p>
+<p>This function sets all the system's global variables to their original state. </p>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="demo__1_8c-example.html#a2">demo_1.c</a>, <a class="el" href="demo__2_8c-example.html#a6">demo_2.c</a>, <a class="el" href="demo__3_8c-example.html#a2">demo_3.c</a>, and <a class="el" href="demo__4_8c-example.html#a8">demo_4.c</a>.</dd>
+</dl>
+<p>Definition at line <a class="el" href="cr_8c_source.html#l00225">225</a> of file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>
 
 </div>
-</div><p>
-<hr><h2>Variable Documentation</h2>
-<a class="anchor" name="22841ff791649abd0bcb62392ebb9778"></a><!-- doxytag: member="cr.c::cr_g_context" ref="22841ff791649abd0bcb62392ebb9778" args="" -->
+</div>
+<hr/><h2>Variable Documentation</h2>
+<a class="anchor" id="a22841ff791649abd0bcb62392ebb9778"></a><!-- doxytag: member="cr.c::cr_g_context" ref="a22841ff791649abd0bcb62392ebb9778" args="" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname"><a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a>* <a class="el" href="cr_8h.html#22841ff791649abd0bcb62392ebb9778">cr_g_context</a> = 0          </td>
+          <td class="memname"><a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a>* <a class="el" href="cr_8h.html#a22841ff791649abd0bcb62392ebb9778">cr_g_context</a> = 0</td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
-<p>
-Pointer to the user defined array of coroutine contexts. 
-<p>
-<dl class="note" compact><dt><b>Note:</b></dt><dd>For internal use only. </dd></dl>
+<p>Pointer to the user defined array of coroutine contexts. </p>
+<dl class="note"><dt><b>Note:</b></dt><dd>For internal use only. </dd></dl>
 
-<p>Definition at line <a class="el" href="cr_8c-source.html#l00164">164</a> of file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
+<p>Definition at line <a class="el" href="cr_8c_source.html#l00164">164</a> of file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>
 
 </div>
-</div><p>
-<a class="anchor" name="8238e77b653b2cc4905373b805fc3567"></a><!-- doxytag: member="cr.c::cr_g_context_cnt" ref="8238e77b653b2cc4905373b805fc3567" args="" -->
+</div>
+<a class="anchor" id="a8238e77b653b2cc4905373b805fc3567"></a><!-- doxytag: member="cr.c::cr_g_context_cnt" ref="a8238e77b653b2cc4905373b805fc3567" args="" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">uint32_t <a class="el" href="cr_8h.html#8238e77b653b2cc4905373b805fc3567">cr_g_context_cnt</a> = 0          </td>
+          <td class="memname">uint32_t <a class="el" href="cr_8h.html#a8238e77b653b2cc4905373b805fc3567">cr_g_context_cnt</a> = 0</td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
-<p>
-The number of elements in the coroutine context array. 
-<p>
-<dl class="note" compact><dt><b>Note:</b></dt><dd>For internal use only. </dd></dl>
+<p>The number of elements in the coroutine context array. </p>
+<dl class="note"><dt><b>Note:</b></dt><dd>For internal use only. </dd></dl>
 
-<p>Definition at line <a class="el" href="cr_8c-source.html#l00169">169</a> of file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
+<p>Definition at line <a class="el" href="cr_8c_source.html#l00169">169</a> of file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>
 
 </div>
-</div><p>
-<a class="anchor" name="cf4ab64c8de56045d84e53b65dba7eb8"></a><!-- doxytag: member="cr.c::cr_g_current_cr_id" ref="cf4ab64c8de56045d84e53b65dba7eb8" args="" -->
+</div>
+<a class="anchor" id="acf4ab64c8de56045d84e53b65dba7eb8"></a><!-- doxytag: member="cr.c::cr_g_current_cr_id" ref="acf4ab64c8de56045d84e53b65dba7eb8" args="" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname"><a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a> <a class="el" href="cr_8h.html#cf4ab64c8de56045d84e53b65dba7eb8">cr_g_current_cr_id</a> = CR_IDLE_THREAD_ID          </td>
+          <td class="memname"><a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a> <a class="el" href="cr_8h.html#acf4ab64c8de56045d84e53b65dba7eb8">cr_g_current_cr_id</a> = CR_IDLE_THREAD_ID</td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
-<p>
-The ID of the coroutine that's active. 
-<p>
-<dl class="note" compact><dt><b>Note:</b></dt><dd>For internal use only. </dd></dl>
+<p>The ID of the coroutine that's active. </p>
+<dl class="note"><dt><b>Note:</b></dt><dd>For internal use only. </dd></dl>
 
-<p>Definition at line <a class="el" href="cr_8c-source.html#l00183">183</a> of file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
+<p>Definition at line <a class="el" href="cr_8c_source.html#l00183">183</a> of file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>
 
 </div>
-</div><p>
-<a class="anchor" name="e7e93574baec3ae2b083c7f36916fbbd"></a><!-- doxytag: member="cr.c::cr_g_previous_cr_id" ref="e7e93574baec3ae2b083c7f36916fbbd" args="" -->
+</div>
+<a class="anchor" id="ae7e93574baec3ae2b083c7f36916fbbd"></a><!-- doxytag: member="cr.c::cr_g_previous_cr_id" ref="ae7e93574baec3ae2b083c7f36916fbbd" args="" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname"><a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a> <a class="el" href="cr_8h.html#e7e93574baec3ae2b083c7f36916fbbd">cr_g_previous_cr_id</a> = CR_IDLE_THREAD_ID          </td>
+          <td class="memname"><a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a> <a class="el" href="cr_8h.html#ae7e93574baec3ae2b083c7f36916fbbd">cr_g_previous_cr_id</a> = CR_IDLE_THREAD_ID</td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
-<p>
-The ID of the previously active coroutine. 
-<p>
-<dl class="note" compact><dt><b>Note:</b></dt><dd>For internal use only. </dd></dl>
+<p>The ID of the previously active coroutine. </p>
+<dl class="note"><dt><b>Note:</b></dt><dd>For internal use only. </dd></dl>
 
-<p>Definition at line <a class="el" href="cr_8c-source.html#l00188">188</a> of file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
+<p>Definition at line <a class="el" href="cr_8c_source.html#l00188">188</a> of file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>
 
 </div>
-</div><p>
-<a class="anchor" name="00999e3368c59592db0c069abf1f1296"></a><!-- doxytag: member="cr.c::cr_g_sys_started" ref="00999e3368c59592db0c069abf1f1296" args="" -->
+</div>
+<a class="anchor" id="a00999e3368c59592db0c069abf1f1296"></a><!-- doxytag: member="cr.c::cr_g_sys_started" ref="a00999e3368c59592db0c069abf1f1296" args="" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">int32_t <a class="el" href="cr_8h.html#00999e3368c59592db0c069abf1f1296">cr_g_sys_started</a> = 0          </td>
+          <td class="memname">int32_t <a class="el" href="cr_8h.html#a00999e3368c59592db0c069abf1f1296">cr_g_sys_started</a> = false</td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
-<p>
-Flag that's set when CR_START is called. 
-<p>
-<dl class="note" compact><dt><b>Note:</b></dt><dd>For internal use only. </dd></dl>
+<p>Flag that's set when CR_START is called. </p>
+<dl class="note"><dt><b>Note:</b></dt><dd>For internal use only. </dd></dl>
 
-<p>Definition at line <a class="el" href="cr_8c-source.html#l00178">178</a> of file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
+<p>Definition at line <a class="el" href="cr_8c_source.html#l00178">178</a> of file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>
 
 </div>
-</div><p>
 </div>
-<hr size="1"><address style="text-align: right;"><small>Generated on Fri May 28 09:13:09 2010 for cr_lib by&nbsp;
+</div>
+<hr class="footer"/><address class="footer"><small>Generated on Fri Jun 25 2010 09:38:58 for cr_lib by&nbsp;
 <a href="http://www.doxygen.org/index.html">
-<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
+<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
 </body>
 </html>

doxygen/html/cr_8c__incl.dot

   Node11 [label="stdint.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
   Node8 -> Node5 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans"];
   Node8 -> Node12 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans"];
-  Node12 [label="assert.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node12 [label="fenv.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node8 -> Node13 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans"];
+  Node13 [label="assert.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
 }

doxygen/html/cr_8c__incl.md5

-e18e926639ebcc8d284bd551f534f52f
+9554590188e4564aeca0302a21bd21f6

doxygen/html/cr_8c_aca6b87323f9ce0bf21b3f06209a97989_cgraph.dot

+digraph G
+{
+  edge [fontname="FreeSans",fontsize="10",labelfontname="FreeSans",labelfontsize="10"];
+  node [fontname="FreeSans",fontsize="10",shape=record];
+  rankdir=LR;
+  Node1 [label="cr_init",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
+  Node1 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans"];
+  Node2 [label="cr_idle",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$cr_8c.html#accd73b48023970380bfdecb56483976c",tooltip="The internal system&#39;s coroutine thread."];
+  Node1 -> Node3 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans"];
+  Node3 [label="cr_register_thread",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$cr_8c.html#ae30bdb4ef569c0678e4cb49829f11bbb",tooltip="Register a function as a coroutine thread."];
+  Node3 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans"];
+}

doxygen/html/cr_8c_aca6b87323f9ce0bf21b3f06209a97989_cgraph.md5

+f1a97a94d76fa92282c2c5272cddaf86

doxygen/html/cr_8c_accd73b48023970380bfdecb56483976c_icgraph.dot

+digraph G
+{
+  edge [fontname="FreeSans",fontsize="10",labelfontname="FreeSans",labelfontsize="10"];
+  node [fontname="FreeSans",fontsize="10",shape=record];
+  rankdir=LR;
+  Node1 [label="cr_idle",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
+  Node1 -> Node2 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans"];
+  Node2 [label="cr_init",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$cr_8h.html#aca6b87323f9ce0bf21b3f06209a97989",tooltip="cr_lib&#39;s initialization function."];
+  Node1 -> Node3 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans"];
+  Node3 [label="cr_register_thread",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$cr_8h.html#ae30bdb4ef569c0678e4cb49829f11bbb",tooltip="Register a function as a coroutine thread."];
+  Node3 -> Node2 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans"];
+}

doxygen/html/cr_8c_accd73b48023970380bfdecb56483976c_icgraph.md5

+a6678459333c283b253e1e259c852ba7

doxygen/html/cr_8c_ae30bdb4ef569c0678e4cb49829f11bbb_cgraph.dot

+digraph G
+{
+  edge [fontname="FreeSans",fontsize="10",labelfontname="FreeSans",labelfontsize="10"];
+  node [fontname="FreeSans",fontsize="10",shape=record];
+  rankdir=LR;
+  Node1 [label="cr_register_thread",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
+  Node1 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans"];
+  Node2 [label="cr_idle",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$cr_8c.html#accd73b48023970380bfdecb56483976c",tooltip="The internal system&#39;s coroutine thread."];
+}

doxygen/html/cr_8c_ae30bdb4ef569c0678e4cb49829f11bbb_cgraph.md5

+966f5cf90c5be25f9ece74bbd5238c62

doxygen/html/cr_8c_ae30bdb4ef569c0678e4cb49829f11bbb_icgraph.dot

+digraph G
+{
+  edge [fontname="FreeSans",fontsize="10",labelfontname="FreeSans",labelfontsize="10"];
+  node [fontname="FreeSans",fontsize="10",shape=record];
+  rankdir=LR;
+  Node1 [label="cr_register_thread",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
+  Node1 -> Node2 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans"];
+  Node2 [label="cr_init",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$cr_8h.html#aca6b87323f9ce0bf21b3f06209a97989",tooltip="cr_lib&#39;s initialization function."];
+}

doxygen/html/cr_8c_ae30bdb4ef569c0678e4cb49829f11bbb_icgraph.md5

+90b2588f17a3d15e106f42fb25c6e9ee

doxygen/html/cr_8c_source.html

+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>cr_lib: cr.c Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+  <div class="tabs">
+    <ul class="tablist">
+      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
+      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li><a href="examples.html"><span>Examples</span></a></li>
+    </ul>
+  </div>
+  <div class="tabs2">
+    <ul class="tablist">
+      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
+      <li><a href="globals.html"><span>Globals</span></a></li>
+    </ul>
+  </div>
+<div class="header">
+  <div class="headertitle">
+<h1>cr.c</h1>  </div>
+</div>
+<div class="contents">
+<a href="cr_8c.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
+<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
+<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;string.h&gt;</span>
+<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
+<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;stdbool.h&gt;</span>
+<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;signal.h&gt;</span>
+<a name="l00023"></a>00023 
+<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;<a class="code" href="cr__config_8h.html">cr_config.h</a>&quot;</span>
+<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;<a class="code" href="cr_8h.html">cr.h</a>&quot;</span>
+<a name="l00026"></a>00026 
+<a name="l00155"></a>00155 <span class="keyword">enum</span> {
+<a name="l00156"></a><a class="code" href="cr_8c.html#a06fc87d81c62e9abb8790b6e5713c55ba84eb6a791d344cea4fadd2638f7b460e">00156</a>     <a class="code" href="cr_8c.html#a06fc87d81c62e9abb8790b6e5713c55ba84eb6a791d344cea4fadd2638f7b460e">CR_ERROR_CR_EXITING</a> = 0 
+<a name="l00157"></a>00157 };
+<a name="l00158"></a>00158 
+<a name="l00159"></a>00159 jmp_buf                 cr_g_reg_func_env;
+<a name="l00160"></a>00160 
+<a name="l00164"></a><a class="code" href="cr_8h.html#a22841ff791649abd0bcb62392ebb9778">00164</a> <a class="code" href="struct_c_r___c_o_n_t_e_x_t.html" title="Coroutine context information.">CR_CONTEXT</a>*             <a class="code" href="cr_8c.html#a22841ff791649abd0bcb62392ebb9778" title="Pointer to the user defined array of coroutine contexts.">cr_g_context</a>        = 0;
+<a name="l00165"></a>00165 
+<a name="l00169"></a><a class="code" href="cr_8h.html#a8238e77b653b2cc4905373b805fc3567">00169</a> uint32_t                <a class="code" href="cr_8c.html#a8238e77b653b2cc4905373b805fc3567" title="The number of elements in the coroutine context array.">cr_g_context_cnt</a>    = 0;
+<a name="l00170"></a>00170 
+<a name="l00173"></a><a class="code" href="cr_8h.html#a1345c6db4d2d1d939e7841da46704d8e">00173</a> <a class="code" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186" title="Coroutine ID typedef.">cr_id_t</a>                 <a class="code" href="cr_8c.html#a1345c6db4d2d1d939e7841da46704d8e" title="Holds the ID of the coroutine to be activated - by cr_idle.">cr_g_activate_id</a>    = CR_IDLE_THREAD_ID;
+<a name="l00174"></a>00174 
+<a name="l00178"></a><a class="code" href="cr_8h.html#a00999e3368c59592db0c069abf1f1296">00178</a> int32_t                 <a class="code" href="cr_8c.html#a00999e3368c59592db0c069abf1f1296" title="Flag that&amp;#39;s set when CR_START is called.">cr_g_sys_started</a>    = <span class="keyword">false</span>;
+<a name="l00179"></a>00179 
+<a name="l00183"></a><a class="code" href="cr_8h.html#acf4ab64c8de56045d84e53b65dba7eb8">00183</a> <a class="code" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186" title="Coroutine ID typedef.">cr_id_t</a>                 <a class="code" href="cr_8c.html#acf4ab64c8de56045d84e53b65dba7eb8" title="The ID of the coroutine that&amp;#39;s active.">cr_g_current_cr_id</a>  = CR_IDLE_THREAD_ID;
+<a name="l00184"></a>00184 
+<a name="l00188"></a><a class="code" href="cr_8h.html#ae7e93574baec3ae2b083c7f36916fbbd">00188</a> <a class="code" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186" title="Coroutine ID typedef.">cr_id_t</a>                 <a class="code" href="cr_8c.html#ae7e93574baec3ae2b083c7f36916fbbd" title="The ID of the previously active coroutine.">cr_g_previous_cr_id</a>  = CR_IDLE_THREAD_ID;
+<a name="l00189"></a>00189 
+<a name="l00193"></a>00193 <span class="keyword">static</span> int32_t          cr_g_thread_cnt      = CR_THREAD_CNT_INIT;
+<a name="l00194"></a>00194 
+<a name="l00203"></a><a class="code" href="cr_8h.html#a3e7a31163658d81c9473e5b637d9eb90">00203</a> <a class="code" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186" title="Coroutine ID typedef.">cr_id_t</a> <a class="code" href="cr_8c.html#a3e7a31163658d81c9473e5b637d9eb90" title="Find the ID of a coroutine.">cr_get_id</a>( <span class="keywordtype">void</span> ( *pFunc )( <span class="keywordtype">void</span> ) )
+<a name="l00204"></a>00204 {
+<a name="l00205"></a>00205     int32_t i;
+<a name="l00206"></a>00206     <a class="code" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186" title="Coroutine ID typedef.">cr_id_t</a> <span class="keywordtype">id</span> = CR_INVALID_ID;
+<a name="l00207"></a>00207 
+<a name="l00208"></a>00208     <span class="keywordflow">for</span> ( i = 0; i &lt;= cr_g_thread_cnt; i++ ) {
+<a name="l00209"></a>00209         <span class="keywordflow">if</span> ( cr_g_context[ i ].pFunc == pFunc ) {
+<a name="l00210"></a>00210             <span class="keywordtype">id</span> = i;
+<a name="l00211"></a>00211             <span class="keywordflow">break</span>;
+<a name="l00212"></a>00212         }
+<a name="l00213"></a>00213     }
+<a name="l00214"></a>00214 
+<a name="l00215"></a>00215 <span class="comment">//    printf( &quot;cr_get_id pFunc: 0x%X\n&quot;, pFunc );</span>
+<a name="l00216"></a>00216 <span class="comment">//    printf( &quot;cr_get_id id: %d\n&quot;, id );</span>
+<a name="l00217"></a>00217 
+<a name="l00218"></a>00218     <span class="keywordflow">return</span> id;
+<a name="l00219"></a>00219 }
+<a name="l00220"></a>00220 
+<a name="l00225"></a><a class="code" href="cr_8h.html#a3e8d6963f6ee2cc49502186eca21d879">00225</a> <span class="keywordtype">void</span> <a class="code" href="cr_8c.html#a3e8d6963f6ee2cc49502186eca21d879" title="Resets the system to an initial state.">cr_reset</a>( <span class="keywordtype">void</span> )
+<a name="l00226"></a>00226 {
+<a name="l00227"></a>00227     cr_g_context        = 0;
+<a name="l00228"></a>00228     <a class="code" href="cr_8c.html#a8238e77b653b2cc4905373b805fc3567" title="The number of elements in the coroutine context array.">cr_g_context_cnt</a>    = 0;
+<a name="l00229"></a>00229     cr_g_thread_cnt     = CR_THREAD_CNT_INIT;
+<a name="l00230"></a>00230     <a class="code" href="cr_8c.html#ae7e93574baec3ae2b083c7f36916fbbd" title="The ID of the previously active coroutine.">cr_g_previous_cr_id</a> = CR_INVALID_ID;
+<a name="l00231"></a>00231     <a class="code" href="cr_8c.html#acf4ab64c8de56045d84e53b65dba7eb8" title="The ID of the coroutine that&amp;#39;s active.">cr_g_current_cr_id</a>  = CR_INVALID_ID;
+<a name="l00232"></a>00232     <a class="code" href="cr_8c.html#a1345c6db4d2d1d939e7841da46704d8e" title="Holds the ID of the coroutine to be activated - by cr_idle.">cr_g_activate_id</a>    = CR_IDLE_THREAD_ID;
+<a name="l00233"></a>00233     <a class="code" href="cr_8c.html#a00999e3368c59592db0c069abf1f1296" title="Flag that&amp;#39;s set when CR_START is called.">cr_g_sys_started</a>    = <span class="keyword">false</span>;
+<a name="l00234"></a>00234 }
+<a name="l00235"></a>00235 
+<a name="l00245"></a><a class="code" href="cr_8h.html#aca6b87323f9ce0bf21b3f06209a97989">00245</a> <span class="keywordtype">void</span> <a class="code" href="cr_8c.html#aca6b87323f9ce0bf21b3f06209a97989" title="cr_lib&amp;#39;s initialization function.">cr_init</a>( <a class="code" href="struct_c_r___c_o_n_t_e_x_t.html" title="Coroutine context information.">CR_CONTEXT</a>*    cr_context,
+<a name="l00246"></a>00246               <span class="keywordtype">size_t</span>         cr_context_count )
+<a name="l00247"></a>00247 {
+<a name="l00248"></a>00248     <span class="comment">// Init the array of CR_CONTEXT structs as well as the globals.</span>
+<a name="l00249"></a>00249     assert( cr_context &amp;&amp; <span class="stringliteral">&quot;user param cr_context must be non-zero!\n&quot;</span> );
+<a name="l00250"></a>00250     assert( ( cr_context_count &gt; 0 ) &amp;&amp; <span class="stringliteral">&quot;user param cr_context_count must be non-zero!\n&quot;</span> );
+<a name="l00251"></a>00251 
+<a name="l00252"></a>00252     memset( cr_context, 0, cr_context_count * <span class="keyword">sizeof</span>( <a class="code" href="struct_c_r___c_o_n_t_e_x_t.html" title="Coroutine context information.">CR_CONTEXT</a> ) );
+<a name="l00253"></a>00253 
+<a name="l00254"></a>00254     cr_g_context        = cr_context;
+<a name="l00255"></a>00255     <a class="code" href="cr_8c.html#a8238e77b653b2cc4905373b805fc3567" title="The number of elements in the coroutine context array.">cr_g_context_cnt</a>    = ( uint32_t ) cr_context_count;
+<a name="l00256"></a>00256 
+<a name="l00257"></a>00257     <span class="comment">// Register the idle thread, which should _always_ be the first coroutine registered.</span>
+<a name="l00258"></a>00258     <a class="code" href="cr_8c.html#ae30bdb4ef569c0678e4cb49829f11bbb" title="Register a function as a coroutine thread.">cr_register_thread</a>( <a class="code" href="cr_8c.html#accd73b48023970380bfdecb56483976c" title="The internal system&amp;#39;s coroutine thread.">cr_idle</a> );
+<a name="l00259"></a>00259 }
+<a name="l00260"></a>00260 
+<a name="l00270"></a><a class="code" href="cr_8h.html#accd73b48023970380bfdecb56483976c">00270</a> <span class="keywordtype">void</span> <a class="code" href="cr_8c.html#accd73b48023970380bfdecb56483976c" title="The internal system&amp;#39;s coroutine thread.">cr_idle</a>( <span class="keywordtype">void</span> )
+<a name="l00271"></a>00271 {
+<a name="l00272"></a>00272     <span class="comment">// This needs to be static because the function initially returns normally.</span>
+<a name="l00273"></a>00273     <span class="keyword">static</span> <a class="code" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186" title="Coroutine ID typedef.">cr_id_t</a> temp_id;
+<a name="l00274"></a>00274 
+<a name="l00275"></a>00275     <a class="code" href="cr_8h.html#ac68ef77f5ea5f5dda5a2f046a2c96429" title="Initializes a function as a coroutine.">CR_THREAD_INIT</a>( );
+<a name="l00276"></a>00276 
+<a name="l00277"></a>00277     assert( ( this_id__ == <a class="code" href="cr_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a60cd04d936d5d89f7468cf9f5240a487">CR_IDLE_THREAD_ID</a> ) &amp;&amp; <span class="stringliteral">&quot;cr_idle: this_id__ != CR_IDLE_THREAD_ID!\n&quot;</span> );
+<a name="l00278"></a>00278 
+<a name="l00279"></a>00279     <span class="comment">// This will be the entry point when longjump is called with cr_idle&#39;s context.</span>
+<a name="l00280"></a>00280     <span class="comment">// No need to perform another setjmp from within the loop; not much happening.</span>
+<a name="l00281"></a>00281     <span class="keywordflow">for</span> ( ; ; ) {
+<a name="l00282"></a>00282         <span class="comment">// Spin until a non-idle thread is activated.</span>
+<a name="l00283"></a>00283         <span class="keywordflow">if</span> ( <a class="code" href="cr_8c.html#a1345c6db4d2d1d939e7841da46704d8e" title="Holds the ID of the coroutine to be activated - by cr_idle.">cr_g_activate_id</a> == <a class="code" href="cr_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a60cd04d936d5d89f7468cf9f5240a487">CR_IDLE_THREAD_ID</a> ) {
+<a name="l00284"></a>00284             <span class="keywordflow">continue</span>;
+<a name="l00285"></a>00285         }
+<a name="l00286"></a>00286 
+<a name="l00287"></a>00287         assert( ( <a class="code" href="cr_8c.html#a1345c6db4d2d1d939e7841da46704d8e" title="Holds the ID of the coroutine to be activated - by cr_idle.">cr_g_activate_id</a> != <a class="code" href="cr_8h.html#adf764cbdea00d65edcd07bb9953ad2b7acd063e5de520275d94952e07b5f29b18">CR_INVALID_ID</a> ) &amp;&amp; <span class="stringliteral">&quot;cr_idle: cr_g_activate_id == CR_INVALID_ID!\n&quot;</span> );
+<a name="l00288"></a>00288         assert( ( ( uint32_t ) <a class="code" href="cr_8c.html#a1345c6db4d2d1d939e7841da46704d8e" title="Holds the ID of the coroutine to be activated - by cr_idle.">cr_g_activate_id</a> &lt;= <a class="code" href="cr_8c.html#a8238e77b653b2cc4905373b805fc3567" title="The number of elements in the coroutine context array.">cr_g_context_cnt</a>) &amp;&amp; <span class="stringliteral">&quot;cr_idle: cr_g_activate_id out of bounds!\n&quot;</span> );
+<a name="l00289"></a>00289         assert( ( <a class="code" href="cr_8c.html#a1345c6db4d2d1d939e7841da46704d8e" title="Holds the ID of the coroutine to be activated - by cr_idle.">cr_g_activate_id</a> != this_id__ ) &amp;&amp; <span class="stringliteral">&quot;cr_idle: recursive coroutine call!\n&quot;</span> );
+<a name="l00290"></a>00290 
+<a name="l00291"></a>00291         temp_id             = <a class="code" href="cr_8c.html#a1345c6db4d2d1d939e7841da46704d8e" title="Holds the ID of the coroutine to be activated - by cr_idle.">cr_g_activate_id</a>;
+<a name="l00292"></a>00292         <a class="code" href="cr_8c.html#a1345c6db4d2d1d939e7841da46704d8e" title="Holds the ID of the coroutine to be activated - by cr_idle.">cr_g_activate_id</a>    = CR_IDLE_THREAD_ID;
+<a name="l00293"></a>00293         <a class="code" href="cr_8c.html#ae7e93574baec3ae2b083c7f36916fbbd" title="The ID of the previously active coroutine.">cr_g_previous_cr_id</a> = CR_IDLE_THREAD_ID;
+<a name="l00294"></a>00294 
+<a name="l00295"></a>00295         <span class="keywordflow">if</span> ( !setjmp( cr_g_context[ <a class="code" href="cr_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a60cd04d936d5d89f7468cf9f5240a487">CR_IDLE_THREAD_ID</a> ].env ) ) {
+<a name="l00296"></a>00296             longjmp( cr_g_context[ temp_id ].env, <a class="code" href="cr_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a7f396d7461f79cb150ed6b69934f58ec">SETJMP_DFLT_RET_VAL</a> );
+<a name="l00297"></a>00297         } <span class="keywordflow">else</span> {
+<a name="l00298"></a>00298             <span class="comment">/* explicit block for the longjmp */</span> ;
+<a name="l00299"></a>00299         }
+<a name="l00300"></a>00300     }
+<a name="l00301"></a>00301 }
+<a name="l00302"></a>00302 
+<a name="l00317"></a><a class="code" href="cr_8h.html#ae30bdb4ef569c0678e4cb49829f11bbb">00317</a> <a class="code" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186" title="Coroutine ID typedef.">cr_id_t</a> <a class="code" href="cr_8c.html#ae30bdb4ef569c0678e4cb49829f11bbb" title="Register a function as a coroutine thread.">cr_register_thread</a>( <span class="keywordtype">void</span> ( *pFunc )( <span class="keywordtype">void</span> ) )
+<a name="l00318"></a>00318 {
+<a name="l00319"></a>00319     <span class="comment">// Increase the coroutine count.</span>
+<a name="l00320"></a>00320     cr_g_thread_cnt += 1;
+<a name="l00321"></a>00321 
+<a name="l00322"></a>00322     <span class="keywordflow">if</span> ( cr_g_thread_cnt == <a class="code" href="cr_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a60cd04d936d5d89f7468cf9f5240a487">CR_IDLE_THREAD_ID</a> ) {
+<a name="l00323"></a>00323         <span class="keywordflow">if</span> ( pFunc != <a class="code" href="cr_8c.html#accd73b48023970380bfdecb56483976c" title="The internal system&amp;#39;s coroutine thread.">cr_idle</a> ) {
+<a name="l00324"></a>00324             perror( <span class="stringliteral">&quot;cr_idle error: cr_g_thread_cnt != CR_IDLE_THREAD_ID. Note, coroutines shouldn&#39;t be registered prior to calling cr_init.&quot;</span> );
+<a name="l00325"></a>00325         }
+<a name="l00326"></a>00326     }
+<a name="l00327"></a>00327 
+<a name="l00328"></a>00328     assert( pFunc &amp;&amp; <span class="stringliteral">&quot;cr_register_thread: pFunc is invalid!\n&quot;</span> );
+<a name="l00329"></a>00329 
+<a name="l00330"></a>00330     <span class="comment">// Account fot the cr_idle coroutine (one reserved index in the array) in the assert check.</span>
+<a name="l00331"></a>00331     assert( ( cr_g_thread_cnt &lt; <a class="code" href="cr_8c.html#a8238e77b653b2cc4905373b805fc3567" title="The number of elements in the coroutine context array.">cr_g_context_cnt</a>) &amp;&amp;
+<a name="l00332"></a>00332                 <span class="stringliteral">&quot;cr_register_thread: [ cr_g_thread_cnt &lt; cr_g_context_cnt ] failed\n&quot;</span> );
+<a name="l00333"></a>00333 
+<a name="l00334"></a>00334     <span class="comment">// Assign the coroutine&#39;s ID and function pointer to its context structure</span>
+<a name="l00335"></a>00335     cr_g_context[ cr_g_thread_cnt ].id    = cr_g_thread_cnt;
+<a name="l00336"></a>00336     cr_g_context[ cr_g_thread_cnt ].pFunc = pFunc;
+<a name="l00337"></a>00337 
+<a name="l00338"></a>00338     <span class="comment">// cr_g_current_cr_id is used by the CR_THREAD_INIT macro to identify</span>
+<a name="l00339"></a>00339     <span class="comment">// the coroutine.</span>
+<a name="l00340"></a>00340     <a class="code" href="cr_8c.html#acf4ab64c8de56045d84e53b65dba7eb8" title="The ID of the coroutine that&amp;#39;s active.">cr_g_current_cr_id</a> = cr_g_thread_cnt;
+<a name="l00341"></a>00341 
+<a name="l00342"></a>00342     <span class="keywordflow">if</span> ( !setjmp( cr_g_reg_func_env ) ) {
+<a name="l00343"></a>00343         pFunc( ); <span class="comment">// this function won&#39;t return normally</span>
+<a name="l00344"></a>00344     } <span class="keywordflow">else</span> {
+<a name="l00345"></a>00345         <span class="comment">/* explicit block for the longjmp */</span>
+<a name="l00346"></a>00346     ;
+<a name="l00347"></a>00347     }
+<a name="l00348"></a>00348 
+<a name="l00349"></a>00349     <span class="comment">// The function is now a coroutine.</span>
+<a name="l00350"></a>00350     <span class="comment">// This is where we return from CR_THREAD_INIT via the longjump.</span>
+<a name="l00351"></a>00351 
+<a name="l00352"></a>00352     <span class="comment">// A sentinal. At init the coroutine returned via a longjump so the return</span>
+<a name="l00353"></a>00353     <span class="comment">// point saved in the function&#39;s prolog is valid and will return here</span>
+<a name="l00354"></a>00354     <span class="comment">// should the coroutine actually return normally via the epilog code.</span>
+<a name="l00355"></a>00355     <span class="keywordflow">if</span> ( <a class="code" href="cr_8c.html#a00999e3368c59592db0c069abf1f1296" title="Flag that&amp;#39;s set when CR_START is called.">cr_g_sys_started</a> == <a class="code" href="cr_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a01288475e3cc36707461f9b757d00e74">CR_SYSTEM_STARTED</a> ) {
+<a name="l00356"></a>00356         <span class="comment">// What to do?</span>
+<a name="l00357"></a>00357         <span class="comment">// - nothing and return normally</span>
+<a name="l00358"></a>00358         <span class="comment">// - yield to whatever is in cr_g_previous_cr_id</span>
+<a name="l00359"></a>00359         <span class="comment">// - yield to cr_idle</span>
+<a name="l00360"></a>00360         <span class="comment">// - assert</span>
+<a name="l00361"></a>00361         <span class="comment">// - exit</span>
+<a name="l00362"></a>00362 
+<a name="l00363"></a>00363         <span class="comment">// Note, cr_g_current_cr_id holds the ID of the exiting coroutine.</span>
+<a name="l00364"></a>00364         <span class="comment">// Note, cr_g_previous_cr_id holds the ID of the previous coroutine.</span>
+<a name="l00365"></a>00365 
+<a name="l00366"></a>00366         <span class="comment">// Note, it&#39;s not possible to remove the exiting coroutine from the</span>
+<a name="l00367"></a>00367         <span class="comment">// context array because the remaining coroutine ID&#39;s cannot be changed,</span>
+<a name="l00368"></a>00368         <span class="comment">// a coroutine&#39;s ID is the index into the context array.</span>
+<a name="l00369"></a>00369 
+<a name="l00370"></a>00370         <span class="comment">// Look at the cr_g_current_cr_id variable in a debugger to see the ID</span>
+<a name="l00371"></a>00371         <span class="comment">// of the exiting coroutine.</span>
+<a name="l00372"></a>00372         assert( <a class="code" href="cr_8c.html#a06fc87d81c62e9abb8790b6e5713c55ba84eb6a791d344cea4fadd2638f7b460e">CR_ERROR_CR_EXITING</a> &amp;&amp; <span class="stringliteral">&quot;cr_register_thread: coruotine exiting!\n&quot;</span> );
+<a name="l00373"></a>00373 
+<a name="l00374"></a>00374         <span class="comment">// Pass EXIT_SUCCESS; we want any user registered clean-up functions to be called.</span>
+<a name="l00375"></a>00375         exit( EXIT_SUCCESS );
+<a name="l00376"></a>00376     }
+<a name="l00377"></a>00377 
+<a name="l00378"></a>00378     <span class="keywordflow">return</span> cr_g_thread_cnt;
+<a name="l00379"></a>00379 }
+<a name="l00380"></a>00380 
+<a name="l00381"></a>00381 <span class="comment">// end of file</span>
+</pre></div></div>
+</div>
+<hr class="footer"/><address class="footer"><small>Generated on Fri Jun 25 2010 09:38:58 for cr_lib by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
+</body>
+</html>

doxygen/html/cr_8h.html

-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 <title>cr_lib: cr.h File Reference</title>
-<link href="tabs.css" rel="stylesheet" type="text/css">
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.5.8 -->
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+<!-- Generated by Doxygen 1.7.1 -->
 <div class="navigation" id="top">
   <div class="tabs">
-    <ul>
+    <ul class="tablist">
       <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
       <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
       <li class="current"><a href="files.html"><span>Files</span></a></li>
       <li><a href="examples.html"><span>Examples</span></a></li>
     </ul>
   </div>
-  <div class="tabs">
-    <ul>
+  <div class="tabs2">
+    <ul class="tablist">
       <li><a href="files.html"><span>File&nbsp;List</span></a></li>
       <li><a href="globals.html"><span>Globals</span></a></li>
     </ul>
   </div>
 </div>
+<div class="header">
+  <div class="summary">
+<a href="#nested-classes">Data Structures</a> &#124;
+<a href="#define-members">Defines</a> &#124;
+<a href="#typedef-members">Typedefs</a> &#124;
+<a href="#enum-members">Enumerations</a> &#124;
+<a href="#func-members">Functions</a> &#124;
+<a href="#var-members">Variables</a>  </div>
+  <div class="headertitle">
+<h1>cr.h File Reference</h1>  </div>
+</div>
 <div class="contents">
-<h1>cr.h File Reference</h1><code>#include &lt;setjmp.h&gt;</code><br>
-<code>#include &lt;stddef.h&gt;</code><br>
-<code>#include &lt;stdint.h&gt;</code><br>
-<code>#include &lt;stdbool.h&gt;</code><br>
-<code>#include &lt;assert.h&gt;</code><br>
+<code>#include &lt;setjmp.h&gt;</code><br/>
+<code>#include &lt;stddef.h&gt;</code><br/>
+<code>#include &lt;stdint.h&gt;</code><br/>
+<code>#include &lt;stdbool.h&gt;</code><br/>
+<code>#include &lt;fenv.h&gt;</code><br/>
+<code>#include &lt;assert.h&gt;</code><br/>
 
-<p>
-<div class="dynheader">
-Include dependency graph for cr.h:</div>
-<div class="dynsection">
-</div>
+<p><a href="cr_8h_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr><td colspan="2"><h2><a name="nested-classes"></a>
+Data Structures</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Coroutine context information.  <a href="struct_c_r___c_o_n_t_e_x_t.html#_details">More...</a><br/></td></tr>
+<tr><td colspan="2"><h2><a name="define-members"></a>
+Defines</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#ac68ef77f5ea5f5dda5a2f046a2c96429">CR_THREAD_INIT</a>()</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initializes a function as a coroutine.  <a href="#ac68ef77f5ea5f5dda5a2f046a2c96429"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#ad89b832374912ca6c097b550a95a8ebf">CR_START</a>(func_name)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Starts the cr_lib system.  <a href="#ad89b832374912ca6c097b550a95a8ebf"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#a18adb578c9437579bc39134852d4fc5b">CR_YIELD</a>(func_name)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Explicitly yields to a coroutine.  <a href="#a18adb578c9437579bc39134852d4fc5b"></a><br/></td></tr>
+<tr><td colspan="2"><h2><a name="typedef-members"></a>
+Typedefs</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef int8_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#aa058fade3e44aea5c2098896835e47fc">cr_int8_t</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Coroutine variable typedefs.  <a href="#aa058fade3e44aea5c2098896835e47fc"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a73f142aa6006115a8412684a32dd577e"></a><!-- doxytag: member="cr.h::cr_uint8_t" ref="a73f142aa6006115a8412684a32dd577e" args="" -->
+typedef uint8_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_uint8_t</b></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac5ed048ec745ff236a340b1c264abbe0"></a><!-- doxytag: member="cr.h::cr_int16_t" ref="ac5ed048ec745ff236a340b1c264abbe0" args="" -->
+typedef int16_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_int16_t</b></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45f5bcd89871c409b2672e1c905fd47c"></a><!-- doxytag: member="cr.h::cr_uint16_t" ref="a45f5bcd89871c409b2672e1c905fd47c" args="" -->
+typedef uint16_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_uint16_t</b></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0513e6e6438b6d5c05a75d3585499747"></a><!-- doxytag: member="cr.h::cr_int32_t" ref="a0513e6e6438b6d5c05a75d3585499747" args="" -->
+typedef int32_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_int32_t</b></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a70e19850a31b4ddf93cbfac80d8f5596"></a><!-- doxytag: member="cr.h::cr_uint32_t" ref="a70e19850a31b4ddf93cbfac80d8f5596" args="" -->
+typedef uint32_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_uint32_t</b></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a81aabf8e7ff2cc78c58b0791f0b015e5"></a><!-- doxytag: member="cr.h::cr_int64_t" ref="a81aabf8e7ff2cc78c58b0791f0b015e5" args="" -->
+typedef int64_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_int64_t</b></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a00b44f3e0d6d8337340687b83d6603e5"></a><!-- doxytag: member="cr.h::cr_uint64_t" ref="a00b44f3e0d6d8337340687b83d6603e5" args="" -->
+typedef uint64_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_uint64_t</b></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef int32_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Coroutine ID typedef.  <a href="#ae9a0f05a9df6e08a47e828db183fa186"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#a22d1195c5636aed1fc8a4bdd7ade60f5">CR_CONTEXT</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Coroutine context information.  <a href="#a22d1195c5636aed1fc8a4bdd7ade60f5"></a><br/></td></tr>
+<tr><td colspan="2"><h2><a name="enum-members"></a>
+Enumerations</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom">{ <br/>
+&nbsp;&nbsp;<a class="el" href="cr_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a7f396d7461f79cb150ed6b69934f58ec">SETJMP_DFLT_RET_VAL</a> =  1, 
+<a class="el" href="cr_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a60cd04d936d5d89f7468cf9f5240a487">CR_IDLE_THREAD_ID</a> =  0, 
+<a class="el" href="cr_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a01288475e3cc36707461f9b757d00e74">CR_SYSTEM_STARTED</a> =  -1, 
+<a class="el" href="cr_8h.html#adf764cbdea00d65edcd07bb9953ad2b7acd063e5de520275d94952e07b5f29b18">CR_INVALID_ID</a> =  -1, 
+<br/>
+&nbsp;&nbsp;<a class="el" href="cr_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a139db075566e7ab9f59a9de7f6d2359f">CR_THREAD_CNT_INIT</a> =  -1
+<br/>
+ }</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Annonymous enumerations that define various states and settings. </p>
+ <a href="cr_8h.html#adf764cbdea00d65edcd07bb9953ad2b7">More...</a><br/></td></tr>
+<tr><td colspan="2"><h2><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#a3e8d6963f6ee2cc49502186eca21d879">cr_reset</a> (void)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets the system to an initial state.  <a href="#a3e8d6963f6ee2cc49502186eca21d879"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#aca6b87323f9ce0bf21b3f06209a97989">cr_init</a> (<a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a> *cr_context, size_t cr_context_count)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">cr_lib's initialization function.  <a href="#aca6b87323f9ce0bf21b3f06209a97989"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#a3e7a31163658d81c9473e5b637d9eb90">cr_get_id</a> (void(*pFunc)(void))</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find the ID of a coroutine.  <a href="#a3e7a31163658d81c9473e5b637d9eb90"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#accd73b48023970380bfdecb56483976c">cr_idle</a> (void)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The internal system's coroutine thread.  <a href="#accd73b48023970380bfdecb56483976c"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#ae30bdb4ef569c0678e4cb49829f11bbb">cr_register_thread</a> (void(*pFunc)(void))</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Register a function as a coroutine thread.  <a href="#ae30bdb4ef569c0678e4cb49829f11bbb"></a><br/></td></tr>
+<tr><td colspan="2"><h2><a name="var-members"></a>
+Variables</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#a22841ff791649abd0bcb62392ebb9778">cr_g_context</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pointer to the user defined array of coroutine contexts.  <a href="#a22841ff791649abd0bcb62392ebb9778"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#a8238e77b653b2cc4905373b805fc3567">cr_g_context_cnt</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The number of elements in the coroutine context array.  <a href="#a8238e77b653b2cc4905373b805fc3567"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#a00999e3368c59592db0c069abf1f1296">cr_g_sys_started</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flag that's set when CR_START is called.  <a href="#a00999e3368c59592db0c069abf1f1296"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#ae7e93574baec3ae2b083c7f36916fbbd">cr_g_previous_cr_id</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The ID of the previously active coroutine.  <a href="#ae7e93574baec3ae2b083c7f36916fbbd"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#acf4ab64c8de56045d84e53b65dba7eb8">cr_g_current_cr_id</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The ID of the coroutine that's active.  <a href="#acf4ab64c8de56045d84e53b65dba7eb8"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1374fdc17d74ee4b6e94c63251886ea3"></a><!-- doxytag: member="cr.h::cr_g_reg_func_env" ref="a1374fdc17d74ee4b6e94c63251886ea3" args="" -->
+jmp_buf&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_g_reg_func_env</b></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1345c6db4d2d1d939e7841da46704d8e"></a><!-- doxytag: member="cr.h::cr_g_activate_id" ref="a1345c6db4d2d1d939e7841da46704d8e" args="" -->
+<a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#a1345c6db4d2d1d939e7841da46704d8e">cr_g_activate_id</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Holds the ID of the coroutine to be activated - by cr_idle. <br/></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<dl class="author"><dt><b>Author:</b></dt><dd>Original author : Joseph D Poirier </dd></dl>
+<dl class="date"><dt><b>Date:</b></dt><dd>Creation date : February 2006</dd></dl>
+<dl class="version"><dt><b>Version:</b></dt><dd>X.X.X</dd></dl>
+<p>VERSION DATE/AUTHOR COMMENT</p>
+<p>LICENSE: see the license.txt file </p>
 
-<p>
-<div class="dynheader">
-This graph shows which files directly or indirectly include this file:</div>
-<div class="dynsection">
-</div>
-
-<p>
-<a href="cr_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Coroutine context information.  <a href="struct_c_r___c_o_n_t_e_x_t.html#_details">More...</a><br></td></tr>
-<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#c68ef77f5ea5f5dda5a2f046a2c96429">CR_THREAD_INIT</a>()</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initializes a function as a coroutine.  <a href="#c68ef77f5ea5f5dda5a2f046a2c96429"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#d89b832374912ca6c097b550a95a8ebf">CR_START</a>(func_name)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Starts the cr_lib system.  <a href="#d89b832374912ca6c097b550a95a8ebf"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#18adb578c9437579bc39134852d4fc5b">CR_YIELD</a>(func_name)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Explicitly yields to a coroutine.  <a href="#18adb578c9437579bc39134852d4fc5b"></a><br></td></tr>
-<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef int8_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#a058fade3e44aea5c2098896835e47fc">cr_int8_t</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Coroutine variable typedefs.  <a href="#a058fade3e44aea5c2098896835e47fc"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="73f142aa6006115a8412684a32dd577e"></a><!-- doxytag: member="cr.h::cr_uint8_t" ref="73f142aa6006115a8412684a32dd577e" args="" -->
-typedef uint8_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_uint8_t</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c5ed048ec745ff236a340b1c264abbe0"></a><!-- doxytag: member="cr.h::cr_int16_t" ref="c5ed048ec745ff236a340b1c264abbe0" args="" -->
-typedef int16_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_int16_t</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="45f5bcd89871c409b2672e1c905fd47c"></a><!-- doxytag: member="cr.h::cr_uint16_t" ref="45f5bcd89871c409b2672e1c905fd47c" args="" -->
-typedef uint16_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_uint16_t</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0513e6e6438b6d5c05a75d3585499747"></a><!-- doxytag: member="cr.h::cr_int32_t" ref="0513e6e6438b6d5c05a75d3585499747" args="" -->
-typedef int32_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_int32_t</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="70e19850a31b4ddf93cbfac80d8f5596"></a><!-- doxytag: member="cr.h::cr_uint32_t" ref="70e19850a31b4ddf93cbfac80d8f5596" args="" -->
-typedef uint32_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_uint32_t</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="81aabf8e7ff2cc78c58b0791f0b015e5"></a><!-- doxytag: member="cr.h::cr_int64_t" ref="81aabf8e7ff2cc78c58b0791f0b015e5" args="" -->
-typedef int64_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_int64_t</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="00b44f3e0d6d8337340687b83d6603e5"></a><!-- doxytag: member="cr.h::cr_uint64_t" ref="00b44f3e0d6d8337340687b83d6603e5" args="" -->
-typedef uint64_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_uint64_t</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef int32_t volatile&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Coroutine ID typedef.  <a href="#e9a0f05a9df6e08a47e828db183fa186"></a><br></td></tr>
-<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom">{ <br>
-&nbsp;&nbsp;<a class="el" href="cr_8h.html#df764cbdea00d65edcd07bb9953ad2b77f396d7461f79cb150ed6b69934f58ec">SETJMP_DFLT_RET_VAL</a> =  1, 
-<a class="el" href="cr_8h.html#df764cbdea00d65edcd07bb9953ad2b760cd04d936d5d89f7468cf9f5240a487">CR_IDLE_THREAD_ID</a> =  0, 
-<a class="el" href="cr_8h.html#df764cbdea00d65edcd07bb9953ad2b701288475e3cc36707461f9b757d00e74">CR_SYSTEM_STARTED</a> =  -1, 
-<a class="el" href="cr_8h.html#df764cbdea00d65edcd07bb9953ad2b7cd063e5de520275d94952e07b5f29b18">CR_INVALID_ID</a> =  -1, 
-<br>
-&nbsp;&nbsp;<a class="el" href="cr_8h.html#df764cbdea00d65edcd07bb9953ad2b7139db075566e7ab9f59a9de7f6d2359f">CR_THREAD_CNT_INIT</a> =  -1
-<br>
- }</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Annonymous enumerations that define various states and settings.  <a href="cr_8h.html#df764cbdea00d65edcd07bb9953ad2b7">More...</a><br></td></tr>
-<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#3e8d6963f6ee2cc49502186eca21d879">cr_reset</a> (void)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets the system to an initial state.  <a href="#3e8d6963f6ee2cc49502186eca21d879"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#ca6b87323f9ce0bf21b3f06209a97989">cr_init</a> (<a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a> *cr_context, size_t cr_context_count)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">cr_lib's initialization function.  <a href="#ca6b87323f9ce0bf21b3f06209a97989"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#3e7a31163658d81c9473e5b637d9eb90">cr_get_id</a> (void(*pFunc)(void))</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find the ID of a coroutine.  <a href="#3e7a31163658d81c9473e5b637d9eb90"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#ccd73b48023970380bfdecb56483976c">cr_idle</a> (void)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The internal system's coroutine thread.  <a href="#ccd73b48023970380bfdecb56483976c"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#e30bdb4ef569c0678e4cb49829f11bbb">cr_register_thread</a> (void(*pFunc)(void))</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Register a function as a coroutine thread.  <a href="#e30bdb4ef569c0678e4cb49829f11bbb"></a><br></td></tr>
-<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#22841ff791649abd0bcb62392ebb9778">cr_g_context</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pointer to the user defined array of coroutine contexts.  <a href="#22841ff791649abd0bcb62392ebb9778"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#8238e77b653b2cc4905373b805fc3567">cr_g_context_cnt</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The number of elements in the coroutine context array.  <a href="#8238e77b653b2cc4905373b805fc3567"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#00999e3368c59592db0c069abf1f1296">cr_g_sys_started</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flag that's set when CR_START is called.  <a href="#00999e3368c59592db0c069abf1f1296"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#e7e93574baec3ae2b083c7f36916fbbd">cr_g_previous_cr_id</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The ID of the previously active coroutine.  <a href="#e7e93574baec3ae2b083c7f36916fbbd"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#cf4ab64c8de56045d84e53b65dba7eb8">cr_g_current_cr_id</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The ID of the coroutine that's active.  <a href="#cf4ab64c8de56045d84e53b65dba7eb8"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1374fdc17d74ee4b6e94c63251886ea3"></a><!-- doxytag: member="cr.h::cr_g_reg_func_env" ref="1374fdc17d74ee4b6e94c63251886ea3" args="" -->
-jmp_buf&nbsp;</td><td class="memItemRight" valign="bottom"><b>cr_g_reg_func_env</b></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1345c6db4d2d1d939e7841da46704d8e"></a><!-- doxytag: member="cr.h::cr_g_activate_id" ref="1345c6db4d2d1d939e7841da46704d8e" args="" -->
-<a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="cr_8h.html#1345c6db4d2d1d939e7841da46704d8e">cr_g_activate_id</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Holds the ID of the coroutine to be activated - by cr_idle. <br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-<dl class="author" compact><dt><b>Author:</b></dt><dd>Original author : Joseph D Poirier </dd></dl>
-<dl class="date" compact><dt><b>Date:</b></dt><dd>Creation date : February 2006</dd></dl>
-<dl class="version" compact><dt><b>Version:</b></dt><dd>X.X.X</dd></dl>
-VERSION DATE/AUTHOR COMMENT<p>
-LICENSE: see the license.txt file 
-<p>Definition in file <a class="el" href="cr_8h-source.html">cr.h</a>.</p>
-<hr><h2>Define Documentation</h2>
-<a class="anchor" name="d89b832374912ca6c097b550a95a8ebf"></a><!-- doxytag: member="cr.h::CR_START" ref="d89b832374912ca6c097b550a95a8ebf" args="(func_name)" -->
+<p>Definition in file <a class="el" href="cr_8h_source.html">cr.h</a>.</p>
+<hr/><h2>Define Documentation</h2>
+<a class="anchor" id="ad89b832374912ca6c097b550a95a8ebf"></a><!-- doxytag: member="cr.h::CR_START" ref="ad89b832374912ca6c097b550a95a8ebf" args="(func_name)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">#define CR_START          </td>
+          <td class="memname">#define CR_START</td>
           <td>(</td>
-          <td class="paramtype">func_name&nbsp;</td>
-          <td class="paramname">          </td>
+          <td class="paramtype">&nbsp;</td>
+          <td class="paramname">func_name</td>
           <td>&nbsp;)&nbsp;</td>
           <td></td>
         </tr>
 </div>
 <div class="memdoc">
 
-<p>
-Starts the cr_lib system. 
-<p>
-This macro basically boostraps the system. Bootstrap the system by fetching the ID of the coroutine to call and call it.<p>
-<dl compact><dt><b>Parameters:</b></dt><dd>
+<p>Starts the cr_lib system. </p>
+<p>This macro basically boostraps the system. Bootstrap the system by fetching the ID of the coroutine to call and call it.</p>
+<dl><dt><b>Parameters:</b></dt><dd>
   <table border="0" cellspacing="2" cellpadding="0">
     <tr><td valign="top"></td><td valign="top"><em>func_name</em>&nbsp;</td><td>the name of a user coroutine or cr_idle</td></tr>
   </table>
+  </dd>
 </dl>
-<dl class="attention" compact><dt><b>Attention:</b></dt><dd>cr_init must have been called and coroutine registration completed </dd></dl>
-<dl compact><dt><b>Examples: </b></dt><dd>
-<a class="el" href="demo__1_8c-example.html#a6">demo_1.c</a>, <a class="el" href="demo__2_8c-example.html#a10">demo_2.c</a>, <a class="el" href="demo__3_8c-example.html#a6">demo_3.c</a>, and <a class="el" href="demo__4_8c-example.html#a10">demo_4.c</a>.</dl>
-<p>Definition at line <a class="el" href="cr_8h-source.html#l00105">105</a> of file <a class="el" href="cr_8h-source.html">cr.h</a>.</p>
+<dl class="attention"><dt><b>Attention:</b></dt><dd>cr_init must have been called and coroutine registration completed </dd></dl>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="demo__1_8c-example.html#a6">demo_1.c</a>, <a class="el" href="demo__2_8c-example.html#a10">demo_2.c</a>, <a class="el" href="demo__3_8c-example.html#a6">demo_3.c</a>, and <a class="el" href="demo__4_8c-example.html#a12">demo_4.c</a>.</dd>
+</dl>
+<p>Definition at line <a class="el" href="cr_8h_source.html#l00108">108</a> of file <a class="el" href="cr_8h_source.html">cr.h</a>.</p>
 
 </div>
-</div><p>
-<a class="anchor" name="c68ef77f5ea5f5dda5a2f046a2c96429"></a><!-- doxytag: member="cr.h::CR_THREAD_INIT" ref="c68ef77f5ea5f5dda5a2f046a2c96429" args="()" -->
+</div>
+<a class="anchor" id="ac68ef77f5ea5f5dda5a2f046a2c96429"></a><!-- doxytag: member="cr.h::CR_THREAD_INIT" ref="ac68ef77f5ea5f5dda5a2f046a2c96429" args="()" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">#define CR_THREAD_INIT          </td>
+          <td class="memname">#define CR_THREAD_INIT</td>
           <td>(</td>
-&nbsp;</td>
-          <td class="paramname">          </td>
+          <td class="paramname"></td>
           <td>&nbsp;)&nbsp;</td>
           <td></td>
         </tr>
 </div>
 <div class="memdoc">
 
-<p>
-Initializes a function as a coroutine. 
-<p>
-This macro creates the static variable this_id__ which holds the ID of the newly created coroutine. cr_g_current_cr_id is used by cr_register_thread to pass the newly assigned coroutine ID to the function being registered. The ID is then used to save the new coroutine's context, which serves as the initial entry point in to the coroutine. Rather than returning normally, a longjmp is performed to get back to the cr_register_thread function.<p>
-<dl class="attention" compact><dt><b>Attention:</b></dt><dd>This macro should be placed at the start of the function being registered as a coroutine. Also, a coroutine should never return normally. </dd></dl>
-<dl compact><dt><b>Examples: </b></dt><dd>
-<a class="el" href="demo__1_8c-example.html#a0">demo_1.c</a>, <a class="el" href="demo__2_8c-example.html#a0">demo_2.c</a>, <a class="el" href="demo__3_8c-example.html#a0">demo_3.c</a>, and <a class="el" href="demo__4_8c-example.html#a3">demo_4.c</a>.</dl>
-<p>Definition at line <a class="el" href="cr_8h-source.html#l00089">89</a> of file <a class="el" href="cr_8h-source.html">cr.h</a>.</p>
+<p>Initializes a function as a coroutine. </p>
+<p>This macro creates the static variable this_id__ which holds the ID of the newly created coroutine. cr_g_current_cr_id is used by cr_register_thread to pass the newly assigned coroutine ID to the function being registered. The ID is then used to save the new coroutine's context, which serves as the initial entry point in to the coroutine. Rather than returning normally, a longjmp is performed to get back to the cr_register_thread function.</p>
+<dl class="attention"><dt><b>Attention:</b></dt><dd>This macro should be placed at the start of the function being registered as a coroutine. Also, a coroutine should never return normally. </dd></dl>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="demo__1_8c-example.html#a0">demo_1.c</a>, <a class="el" href="demo__2_8c-example.html#a0">demo_2.c</a>, <a class="el" href="demo__3_8c-example.html#a0">demo_3.c</a>, and <a class="el" href="demo__4_8c-example.html#a5">demo_4.c</a>.</dd>
+</dl>
+<p>Definition at line <a class="el" href="cr_8h_source.html#l00090">90</a> of file <a class="el" href="cr_8h_source.html">cr.h</a>.</p>
 
 </div>
-</div><p>
-<a class="anchor" name="18adb578c9437579bc39134852d4fc5b"></a><!-- doxytag: member="cr.h::CR_YIELD" ref="18adb578c9437579bc39134852d4fc5b" args="(func_name)" -->
+</div>
+<a class="anchor" id="a18adb578c9437579bc39134852d4fc5b"></a><!-- doxytag: member="cr.h::CR_YIELD" ref="a18adb578c9437579bc39134852d4fc5b" args="(func_name)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">#define CR_YIELD          </td>
+          <td class="memname">#define CR_YIELD</td>
           <td>(</td>
-          <td class="paramtype">func_name&nbsp;</td>
-          <td class="paramname">          </td>
+          <td class="paramtype">&nbsp;</td>
+          <td class="paramname">func_name</td>
           <td>&nbsp;)&nbsp;</td>
           <td></td>
         </tr>
 </div>
 <div class="memdoc">
 
-<p>
-Explicitly yields to a coroutine. 
-<p>
-This macro fetches the ID of the coroutine to be called, sets the current environment, then makes a longjmp to the desired coroutine.<p>
-<dl compact><dt><b>Parameters:</b></dt><dd>
+<p>Explicitly yields to a coroutine. </p>
+<p>This macro fetches the ID of the coroutine to be called, sets the current environment, then makes a longjmp to the desired coroutine.</p>
+<dl><dt><b>Parameters:</b></dt><dd>
   <table border="0" cellspacing="2" cellpadding="0">
     <tr><td valign="top"></td><td valign="top"><em>func_name</em>&nbsp;</td><td>the name of a user coroutine or cr_idle </td></tr>
   </table>
+  </dd>
 </dl>
-<dl compact><dt><b>Examples: </b></dt><dd>
-<a class="el" href="demo__1_8c-example.html#a1">demo_1.c</a>, <a class="el" href="demo__2_8c-example.html#a4">demo_2.c</a>, <a class="el" href="demo__3_8c-example.html#a1">demo_3.c</a>, and <a class="el" href="demo__4_8c-example.html#a4">demo_4.c</a>.</dl>
-<p>Definition at line <a class="el" href="cr_8h-source.html#l00121">121</a> of file <a class="el" href="cr_8h-source.html">cr.h</a>.</p>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="demo__1_8c-example.html#a1">demo_1.c</a>, <a class="el" href="demo__2_8c-example.html#a4">demo_2.c</a>, <a class="el" href="demo__3_8c-example.html#a1">demo_3.c</a>, and <a class="el" href="demo__4_8c-example.html#a6">demo_4.c</a>.</dd>
+</dl>
+<p>Definition at line <a class="el" href="cr_8h_source.html#l00124">124</a> of file <a class="el" href="cr_8h_source.html">cr.h</a>.</p>
 
 </div>
-</div><p>
-<hr><h2>Typedef Documentation</h2>
-<a class="anchor" name="e9a0f05a9df6e08a47e828db183fa186"></a><!-- doxytag: member="cr.h::cr_id_t" ref="e9a0f05a9df6e08a47e828db183fa186" args="" -->
+</div>
+<hr/><h2>Typedef Documentation</h2>
+<a class="anchor" id="a22d1195c5636aed1fc8a4bdd7ade60f5"></a><!-- doxytag: member="cr.h::CR_CONTEXT" ref="a22d1195c5636aed1fc8a4bdd7ade60f5" args="" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">typedef int32_t volatile <a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a>          </td>
+          <td class="memname">typedef struct <a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a>  <a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a></td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
-<p>
-Coroutine ID typedef. 
-<p>
-Coroutine ID type used by the cr_lib system. 
-<p>Definition at line <a class="el" href="cr_8h-source.html#l00062">62</a> of file <a class="el" href="cr_8h-source.html">cr.h</a>.</p>
+<p>Coroutine context information. </p>
+<p>A pointer to an array of this structure type is passed to the cr_init function.</p>
+<dl class="note"><dt><b>Note:</b></dt><dd>The context array _must_ include 1 extra element for the system's cr_idle coroutine. </dd></dl>
 
 </div>
-</div><p>
-<a class="anchor" name="a058fade3e44aea5c2098896835e47fc"></a><!-- doxytag: member="cr.h::cr_int8_t" ref="a058fade3e44aea5c2098896835e47fc" args="" -->
+</div>
+<a class="anchor" id="ae9a0f05a9df6e08a47e828db183fa186"></a><!-- doxytag: member="cr.h::cr_id_t" ref="ae9a0f05a9df6e08a47e828db183fa186" args="" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">typedef int8_t volatile <a class="el" href="cr_8h.html#a058fade3e44aea5c2098896835e47fc">cr_int8_t</a>          </td>
+          <td class="memname">typedef int32_t volatile <a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a></td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
-<p>
-Coroutine variable typedefs. 
-<p>
-Some convenience typdefs for defining local thread variables.<p>
-<dl class="note" compact><dt><b>Note:</b></dt><dd>Local types _should_ include the volatile qualifier. </dd></dl>
+<p>Coroutine ID typedef. </p>
+<p>Coroutine ID type used by the cr_lib system. </p>
 
-<p>Definition at line <a class="el" href="cr_8h-source.html#l00037">37</a> of file <a class="el" href="cr_8h-source.html">cr.h</a>.</p>
+<p>Definition at line <a class="el" href="cr_8h_source.html#l00063">63</a> of file <a class="el" href="cr_8h_source.html">cr.h</a>.</p>
 
 </div>
-</div><p>
-<hr><h2>Enumeration Type Documentation</h2>
-<a class="anchor" name="df764cbdea00d65edcd07bb9953ad2b7"></a><!-- doxytag: member="cr.h::@1" ref="df764cbdea00d65edcd07bb9953ad2b7" args="" -->
+</div>
+<a class="anchor" id="aa058fade3e44aea5c2098896835e47fc"></a><!-- doxytag: member="cr.h::cr_int8_t" ref="aa058fade3e44aea5c2098896835e47fc" args="" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">anonymous enum          </td>
+          <td class="memname">typedef int8_t volatile <a class="el" href="cr_8h.html#aa058fade3e44aea5c2098896835e47fc">cr_int8_t</a></td>
         </tr>
       </table>
 </div>
 <div class="memdoc">
 
-<p>
-Annonymous enumerations that define various states and settings. 
-<p>
-<dl compact><dt><b>Enumerator: </b></dt><dd>
-<table border="0" cellspacing="2" cellpadding="0">
-<tr><td valign="top"><em><a class="anchor" name="df764cbdea00d65edcd07bb9953ad2b77f396d7461f79cb150ed6b69934f58ec"></a><!-- doxytag: member="SETJMP_DFLT_RET_VAL" ref="df764cbdea00d65edcd07bb9953ad2b77f396d7461f79cb150ed6b69934f58ec" args="" -->SETJMP_DFLT_RET_VAL</em>&nbsp;</td><td>
-longjmp's required second paramter, which is setjmp's return value </td></tr>
-<tr><td valign="top"><em><a class="anchor" name="df764cbdea00d65edcd07bb9953ad2b760cd04d936d5d89f7468cf9f5240a487"></a><!-- doxytag: member="CR_IDLE_THREAD_ID" ref="df764cbdea00d65edcd07bb9953ad2b760cd04d936d5d89f7468cf9f5240a487" args="" -->CR_IDLE_THREAD_ID</em>&nbsp;</td><td>
-ID of the system's cr_idle coroutine </td></tr>
-<tr><td valign="top"><em><a class="anchor" name="df764cbdea00d65edcd07bb9953ad2b701288475e3cc36707461f9b757d00e74"></a><!-- doxytag: member="CR_SYSTEM_STARTED" ref="df764cbdea00d65edcd07bb9953ad2b701288475e3cc36707461f9b757d00e74" args="" -->CR_SYSTEM_STARTED</em>&nbsp;</td><td>
-Sentinal flag used internall </td></tr>
-<tr><td valign="top"><em><a class="anchor" name="df764cbdea00d65edcd07bb9953ad2b7cd063e5de520275d94952e07b5f29b18"></a><!-- doxytag: member="CR_INVALID_ID" ref="df764cbdea00d65edcd07bb9953ad2b7cd063e5de520275d94952e07b5f29b18" args="" -->CR_INVALID_ID</em>&nbsp;</td><td>
-Returned by cr_get_id when an ID is not found </td></tr>
-<tr><td valign="top"><em><a class="anchor" name="df764cbdea00d65edcd07bb9953ad2b7139db075566e7ab9f59a9de7f6d2359f"></a><!-- doxytag: member="CR_THREAD_CNT_INIT" ref="df764cbdea00d65edcd07bb9953ad2b7139db075566e7ab9f59a9de7f6d2359f" args="" -->CR_THREAD_CNT_INIT</em>&nbsp;</td><td>
-Internal initialization value </td></tr>
-</table>
-</dl>
+<p>Coroutine variable typedefs. </p>
+<p>Some convenience typdefs for defining local thread variables.</p>
+<dl class="note"><dt><b>Note:</b></dt><dd>Local types _should_ include the volatile qualifier. </dd></dl>
 
-<p>Definition at line <a class="el" href="cr_8h-source.html#l00049">49</a> of file <a class="el" href="cr_8h-source.html">cr.h</a>.</p>
+<p>Definition at line <a class="el" href="cr_8h_source.html#l00038">38</a> of file <a class="el" href="cr_8h_source.html">cr.h</a>.</p>
 
 </div>
-</div><p>
-<hr><h2>Function Documentation</h2>
-<a class="anchor" name="3e7a31163658d81c9473e5b637d9eb90"></a><!-- doxytag: member="cr.h::cr_get_id" ref="3e7a31163658d81c9473e5b637d9eb90" args="(void(*pFunc)(void))" -->
+</div>
+<hr/><h2>Enumeration Type Documentation</h2>
+<a class="anchor" id="adf764cbdea00d65edcd07bb9953ad2b7"></a><!-- doxytag: member="cr.h::@1" ref="adf764cbdea00d65edcd07bb9953ad2b7" args="" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname"><a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a> cr_get_id           </td>
+          <td class="memname">anonymous enum</td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>Annonymous enumerations that define various states and settings. </p>
+<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
+<tr><td valign="top"><em><a class="anchor" id="adf764cbdea00d65edcd07bb9953ad2b7a7f396d7461f79cb150ed6b69934f58ec"></a><!-- doxytag: member="SETJMP_DFLT_RET_VAL" ref="adf764cbdea00d65edcd07bb9953ad2b7a7f396d7461f79cb150ed6b69934f58ec" args="" -->SETJMP_DFLT_RET_VAL</em>&nbsp;</td><td>
+<p>longjmp's required second paramter, which is setjmp's return value </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="adf764cbdea00d65edcd07bb9953ad2b7a60cd04d936d5d89f7468cf9f5240a487"></a><!-- doxytag: member="CR_IDLE_THREAD_ID" ref="adf764cbdea00d65edcd07bb9953ad2b7a60cd04d936d5d89f7468cf9f5240a487" args="" -->CR_IDLE_THREAD_ID</em>&nbsp;</td><td>
+<p>ID of the system's cr_idle coroutine </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="adf764cbdea00d65edcd07bb9953ad2b7a01288475e3cc36707461f9b757d00e74"></a><!-- doxytag: member="CR_SYSTEM_STARTED" ref="adf764cbdea00d65edcd07bb9953ad2b7a01288475e3cc36707461f9b757d00e74" args="" -->CR_SYSTEM_STARTED</em>&nbsp;</td><td>
+<p>Sentinal flag used internally </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="adf764cbdea00d65edcd07bb9953ad2b7acd063e5de520275d94952e07b5f29b18"></a><!-- doxytag: member="CR_INVALID_ID" ref="adf764cbdea00d65edcd07bb9953ad2b7acd063e5de520275d94952e07b5f29b18" args="" -->CR_INVALID_ID</em>&nbsp;</td><td>
+<p>Returned by cr_get_id when an ID is not found </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="adf764cbdea00d65edcd07bb9953ad2b7a139db075566e7ab9f59a9de7f6d2359f"></a><!-- doxytag: member="CR_THREAD_CNT_INIT" ref="adf764cbdea00d65edcd07bb9953ad2b7a139db075566e7ab9f59a9de7f6d2359f" args="" -->CR_THREAD_CNT_INIT</em>&nbsp;</td><td>
+<p>Internal initialization value </p>
+</td></tr>
+</table>
+</dd>
+</dl>
+
+<p>Definition at line <a class="el" href="cr_8h_source.html#l00050">50</a> of file <a class="el" href="cr_8h_source.html">cr.h</a>.</p>
+
+</div>
+</div>
+<hr/><h2>Function Documentation</h2>
+<a class="anchor" id="a3e7a31163658d81c9473e5b637d9eb90"></a><!-- doxytag: member="cr.h::cr_get_id" ref="a3e7a31163658d81c9473e5b637d9eb90" args="(void(*pFunc)(void))" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a> cr_get_id </td>
           <td>(</td>
           <td class="paramtype">void(*)(void)&nbsp;</td>
-          <td class="paramname"> <em>pFunc</em>          </td>
+          <td class="paramname"> <em>pFunc</em></td>
           <td>&nbsp;)&nbsp;</td>
           <td></td>
         </tr>
 </div>
 <div class="memdoc">
 
-<p>
-Find the ID of a coroutine. 
-<p>
-Returns the ID of a registered coroutine.<p>
-<dl compact><dt><b>Parameters:</b></dt><dd>
+<p>Find the ID of a coroutine. </p>
+<p>Returns the ID of a registered coroutine.</p>
+<dl><dt><b>Parameters:</b></dt><dd>
   <table border="0" cellspacing="2" cellpadding="0">
     <tr><td valign="top"></td><td valign="top"><em>pFunc</em>&nbsp;</td><td>the registered coroutine whose ID is requested </td></tr>
   </table>
+  </dd>
 </dl>
-<dl compact><dt><b>Return values:</b></dt><dd>
+<dl><dt><b>Return values:</b></dt><dd>
   <table border="0" cellspacing="2" cellpadding="0">
     <tr><td valign="top"></td><td valign="top"><em>CR_INVALID_ID</em>&nbsp;</td><td>when no ID is found </td></tr>
     <tr><td valign="top"></td><td valign="top"><em>id</em>&nbsp;</td><td>a valid coroutine's ID </td></tr>
   </table>
+  </dd>
 </dl>
 
-<p>Definition at line <a class="el" href="cr_8c-source.html#l00203">203</a> of file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
+<p>Definition at line <a class="el" href="cr_8c_source.html#l00203">203</a> of file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>
 
 </div>
-</div><p>
-<a class="anchor" name="ccd73b48023970380bfdecb56483976c"></a><!-- doxytag: member="cr.h::cr_idle" ref="ccd73b48023970380bfdecb56483976c" args="(void)" -->
+</div>
+<a class="anchor" id="accd73b48023970380bfdecb56483976c"></a><!-- doxytag: member="cr.h::cr_idle" ref="accd73b48023970380bfdecb56483976c" args="(void)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">void cr_idle           </td>
+          <td class="memname">void cr_idle </td>
           <td>(</td>
           <td class="paramtype">void&nbsp;</td>
-          <td class="paramname">          </td>
+          <td class="paramname"></td>
           <td>&nbsp;)&nbsp;</td>
           <td></td>
         </tr>
 </div>
 <div class="memdoc">
 
-<p>
-The internal system's coroutine thread. 
-<p>
-This coroutine thread is used in conjunction with the cr_g_activate_id variable. cr_g_activate_id can be set to a coroutine's ID, e.g. in an ISR handler, and this function will activate the coroutine. This will work only if this function is explicitly called via CR_YIELD.<p>
-<dl class="attention" compact><dt><b>Attention:</b></dt><dd>This coroutine thread must be explicitly called for it to run. </dd></dl>
+<p>The internal system's coroutine thread. </p>
+<p>This coroutine thread is used in conjunction with the cr_g_activate_id variable. cr_g_activate_id can be set to a coroutine's ID, e.g. in an ISR handler, and this function will activate the coroutine. This will work only if this function is explicitly called via CR_YIELD.</p>
+<dl class="attention"><dt><b>Attention:</b></dt><dd>This coroutine thread must be explicitly called for it to run. </dd></dl>
 
-<p>Definition at line <a class="el" href="cr_8c-source.html#l00270">270</a> of file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
-
-<p>
-<div class="dynheader">
-Here is the caller graph for this function:</div>
-<div class="dynsection">
-</div>
+<p>Definition at line <a class="el" href="cr_8c_source.html#l00270">270</a> of file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>
 
 </div>
-</div><p>
-<a class="anchor" name="ca6b87323f9ce0bf21b3f06209a97989"></a><!-- doxytag: member="cr.h::cr_init" ref="ca6b87323f9ce0bf21b3f06209a97989" args="(CR_CONTEXT *cr_context, size_t cr_context_count)" -->
+</div>
+<a class="anchor" id="aca6b87323f9ce0bf21b3f06209a97989"></a><!-- doxytag: member="cr.h::cr_init" ref="aca6b87323f9ce0bf21b3f06209a97989" args="(CR_CONTEXT *cr_context, size_t cr_context_count)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">void cr_init           </td>
+          <td class="memname">void cr_init </td>
           <td>(</td>
           <td class="paramtype"><a class="el" href="struct_c_r___c_o_n_t_e_x_t.html">CR_CONTEXT</a> *&nbsp;</td>
           <td class="paramname"> <em>cr_context</em>, </td>
 </div>
 <div class="memdoc">
 
-<p>
-cr_lib's initialization function. 
-<p>
-This function sets a global pointer to the array holding all of the registered coroutines context information, as well as, the element count of the array.<p>
-<dl compact><dt><b>Parameters:</b></dt><dd>
+<p>cr_lib's initialization function. </p>
+<p>This function sets a global pointer to the array holding all of the registered coroutines context information, as well as, the element count of the array.</p>
+<dl><dt><b>Parameters:</b></dt><dd>
   <table border="0" cellspacing="2" cellpadding="0">
     <tr><td valign="top"></td><td valign="top"><em>cr_context</em>&nbsp;</td><td>the context array </td></tr>
     <tr><td valign="top"></td><td valign="top"><em>cr_context_count</em>&nbsp;</td><td>the element count of the array </td></tr>
   </table>
+  </dd>
 </dl>
-<dl class="attention" compact><dt><b>Attention:</b></dt><dd>This initialization function must be the first function called in the library. </dd></dl>
+<dl class="attention"><dt><b>Attention:</b></dt><dd>This initialization function must be the first function called in the library. </dd></dl>
 
-<p>Definition at line <a class="el" href="cr_8c-source.html#l00245">245</a> of file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
-
-<p>
-<div class="dynheader">
-Here is the call graph for this function:</div>
-<div class="dynsection">
-</div>
+<p>Definition at line <a class="el" href="cr_8c_source.html#l00245">245</a> of file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>
 
 </div>
-</div><p>
-<a class="anchor" name="e30bdb4ef569c0678e4cb49829f11bbb"></a><!-- doxytag: member="cr.h::cr_register_thread" ref="e30bdb4ef569c0678e4cb49829f11bbb" args="(void(*pFunc)(void))" -->
+</div>
+<a class="anchor" id="ae30bdb4ef569c0678e4cb49829f11bbb"></a><!-- doxytag: member="cr.h::cr_register_thread" ref="ae30bdb4ef569c0678e4cb49829f11bbb" args="(void(*pFunc)(void))" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname"><a class="el" href="cr_8h.html#e9a0f05a9df6e08a47e828db183fa186">cr_id_t</a> cr_register_thread           </td>
+          <td class="memname"><a class="el" href="cr_8h.html#ae9a0f05a9df6e08a47e828db183fa186">cr_id_t</a> cr_register_thread </td>
           <td>(</td>
           <td class="paramtype">void(*)(void)&nbsp;</td>
-          <td class="paramname"> <em>pFunc</em>          </td>
+          <td class="paramname"> <em>pFunc</em></td>
           <td>&nbsp;)&nbsp;</td>
           <td></td>
         </tr>
 </div>
 <div class="memdoc">
 
-<p>
-Register a function as a coroutine thread. 
-<p>
-This function creates an ID for the new coroutine thread and associates the ID with a context element. Information about the coroutine is set in the context element. cr_g_current_cr_id is set to the new coroutine's ID. The cr_register_thread function's context is saved and the user function is called. The CR_THREAD_INIT macro performs a longjmp back to this function using the previously saved context. The cr_g_sys_started flag is checked to determine if a user coroutine has exited via the function's epilog code.<p>
-<dl compact><dt><b>Parameters:</b></dt><dd>
+<p>Register a function as a coroutine thread. </p>
+<p>This function creates an ID for the new coroutine thread and associates the ID with a context element. Information about the coroutine is set in the context element. cr_g_current_cr_id is set to the new coroutine's ID. The cr_register_thread function's context is saved and the user function is called. The CR_THREAD_INIT macro performs a longjmp back to this function using the previously saved context. The cr_g_sys_started flag is checked to determine if a user coroutine has exited via the function's epilog code.</p>
+<dl><dt><b>Parameters:</b></dt><dd>
   <table border="0" cellspacing="2" cellpadding="0">
     <tr><td valign="top"></td><td valign="top"><em>pFunc</em>&nbsp;</td><td>the function to be registered </td></tr>
   </table>
+  </dd>
 </dl>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>The ID of the registered coroutine. </dd></dl>
-<dl class="attention" compact><dt><b>Attention:</b></dt><dd>All coroutine thread registration must be completed before calling CR_START. </dd></dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>The ID of the registered coroutine. </dd></dl>
+<dl class="attention"><dt><b>Attention:</b></dt><dd>All coroutine thread registration must be completed before calling CR_START. </dd></dl>
 
-<p>Definition at line <a class="el" href="cr_8c-source.html#l00317">317</a> of file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
-
-<p>
-<div class="dynheader">
-Here is the call graph for this function:</div>
-<div class="dynsection">
-</div>
-
-<p>
-<div class="dynheader">
-Here is the caller graph for this function:</div>
-<div class="dynsection">
-</div>
+<p>Definition at line <a class="el" href="cr_8c_source.html#l00317">317</a> of file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>
 
 </div>
-</div><p>
-<a class="anchor" name="3e8d6963f6ee2cc49502186eca21d879"></a><!-- doxytag: member="cr.h::cr_reset" ref="3e8d6963f6ee2cc49502186eca21d879" args="(void)" -->
+</div>
+<a class="anchor" id="a3e8d6963f6ee2cc49502186eca21d879"></a><!-- doxytag: member="cr.h::cr_reset" ref="a3e8d6963f6ee2cc49502186eca21d879" args="(void)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">void cr_reset           </td>
+          <td class="memname">void cr_reset </td>
           <td>(</td>
           <td class="paramtype">void&nbsp;</td>
-          <td class="paramname">          </td>
+          <td class="paramname"></td>
           <td>&nbsp;)&nbsp;</td>
           <td></td>
         </tr>
 </div>
 <div class="memdoc">
 
-<p>
-Resets the system to an initial state. 
-<p>
-This function sets all the system's global variables to their original state. 
-<p>Definition at line <a class="el" href="cr_8c-source.html#l00225">225</a> of file <a class="el" href="cr_8c-source.html">cr.c</a>.</p>
+<p>Resets the system to an initial state. </p>
+<p>This function sets all the system's global variables to their original state. </p>
+
+<p>Definition at line <a class="el" href="cr_8c_source.html#l00225">225</a> of file <a class="el" href="cr_8c_source.html">cr.c</a>.</p>