⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 task_8c.html

📁 yavrtos,一款用于广泛用于AVR单片机的RTOS,文件里是这款OS的源码
💻 HTML
📖 第 1 页 / 共 3 页
字号:
      </table></div><div class="memdoc"><p>Find out if a mailbox is "empty" (i.e. if there is no-one waiting to read it). <p><p><b>For internal use only.</b></p><p>Note that interrupts must be disabled before we enter </p></div></div><p><a class="anchor" name="aa4ee75536398ba2bd21466b13bdcd57"></a><!-- doxytag: member="task.c::switch_task" ref="aa4ee75536398ba2bd21466b13bdcd57" args="()" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void switch_task           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p><p><b>For internal use only.</b></p><p>Perform a task switch </p><p>Note that interrupts must be disabled before we enter, and the stack pointer should be set up to use the system stack. </div></div><p><a class="anchor" name="c85c4cc0394680fc16ce32fcc987e62e"></a><!-- doxytag: member="task.c::task_starter" ref="c85c4cc0394680fc16ce32fcc987e62e" args="()" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void task_starter           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p><p><b>For internal use only.</b></p><p>The entry point for all tasks </p><p>First, interrupts are enabled, so that the tick interrupt can happen. Then, the task procedure is executed. When the task procedure exits, if the task priority is zero, it is re-executed. If the task priority isn't zero, the task is shut down. </div></div><p><a class="anchor" name="b1c4cc247bd379e340e25bd86911919d"></a><!-- doxytag: member="task.c::task_stopper" ref="b1c4cc247bd379e340e25bd86911919d" args="()" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void task_stopper           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p><p><b>For internal use only.</b></p><p>The entry point for all tasks that are stopping </p><p>If this task is being stopped by a call to <a class="el" href="group__task.html#ge1337adc1d63d7cd874a376d6513c04a" title="Stop a task.">stop_task()</a> with the <code>wait_for_mutexes</code> parameter set, then the task will continue to run as normal until the last mutex is released. When that happens, then this task stopper will start running on the task.<p>First, interrupts are enabled, then any mailbox being read is released<p>If the task has a cleanup procedure defined (the <code>cleanup</code> argument to <a class="el" href="group__task.html#g9b849c9a0e0b29417cf47da99226dcc3" title="Create a task, ready to be run.">create_task()</a>), it is called<p>Then, the task state is set to stopped, all mutexes and mailboxes are released, the (internal) task stopping semaphore is signalled, and a task switch is executed. </div></div><p><hr><h2>Variable Documentation</h2><a class="anchor" name="032a246385c40a7254d11dd557140401"></a><!-- doxytag: member="task.c::first_task" ref="032a246385c40a7254d11dd557140401" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="structtask__t.html">task_t</a>* <a class="el" href="task_8c.html#032a246385c40a7254d11dd557140401">first_task</a> = 0          </td>        </tr>      </table></div><div class="memdoc"><p><p><b>For internal use only.</b></p><p>Pointer to the first task in our linked list </p><p></div></div><p><a class="anchor" name="8e20fafa56301aad5b476cbd2c9e5b48"></a><!-- doxytag: member="task.c::system" ref="8e20fafa56301aad5b476cbd2c9e5b48" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">struct <a class="el" href="structsystem__struct.html">system_struct</a> <a class="el" href="task_8h.html#8e20fafa56301aad5b476cbd2c9e5b48">system</a>          </td>        </tr>      </table></div><div class="memdoc"><p><p><b>For internal use only.</b></p><p>The system stack, and a flag indicating whether the CPU is currently processing an interrupt </p><p><p><b>For internal use only.</b></p><p>The <a class="el" href="structsystem__struct.html" title="Structure used by the system to hold the system stack, and a flag indicating whether...">system_struct</a> used to hold the system stack and a flag indicating whether an ISR is currently being executed </p></div></div><p><a class="anchor" name="add86cc9d9d60a1e9e90466dd09f3d3f"></a><!-- doxytag: member="task.c::task_stopping_semaphore" ref="add86cc9d9d60a1e9e90466dd09f3d3f" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="structsemaphore__t.html">semaphore_t</a> <a class="el" href="task_8c.html#add86cc9d9d60a1e9e90466dd09f3d3f">task_stopping_semaphore</a>          </td>        </tr>      </table></div><div class="memdoc"><p><p><b>For internal use only.</b></p><p>A semaphore we use to not return from <a class="el" href="group__task.html#ge1337adc1d63d7cd874a376d6513c04a" title="Stop a task.">stop_task()</a> until the task in question has actually stopped </p><p></div></div><p><hr><p align="center"><font size="-1">YAVRTOS and YAVRTOS documentation Copyright &copy; 2007-2008 Chris O'Byrne. Email - chris &lt;at&gt; obyrne &lt;dot&gt; com</font></p></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -