<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>UbixOS V2: src/sys/kernel/ubthread.c File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.7 --> <div class="tabs"> <ul> <li><a href="main.html"><span>Main Page</span></a></li> <li><a href="classes.html"><span>Data Structures</span></a></li> <li id="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> <li> <form action="search.php" method="get"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td><label> <u>S</u>earch for </label></td> <td><input type="text" name="query" value="" size="20" accesskey="s"/></td> </tr> </table> </form> </li> </ul></div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul></div> <div class="nav"> <a class="el" href="dir_897b6a2d7bab147dd1db58381aad3984.html">src</a> » <a class="el" href="dir_832905b1f7f5feaf61a306b40c0ac817.html">sys</a> » <a class="el" href="dir_7efffd2b1fae7bb6f2aa85845c863494.html">kernel</a></div> <h1>ubthread.c File Reference</h1><code>#include <<a class="el" href="ubthread_8h-source.html">ubixos/ubthread.h</a>></code><br> <code>#include <<a class="el" href="exec_8h-source.html">ubixos/exec.h</a>></code><br> <code>#include <<a class="el" href="sched_8h-source.html">ubixos/sched.h</a>></code><br> <code>#include <<a class="el" href="time_8h-source.html">ubixos/time.h</a>></code><br> <code>#include <<a class="el" href="spinlock_8h-source.html">ubixos/spinlock.h</a>></code><br> <code>#include <<a class="el" href="vitals_8h-source.html">ubixos/vitals.h</a>></code><br> <code>#include <<a class="el" href="kmalloc_8h-source.html">lib/kmalloc.h</a>></code><br> <code>#include <<a class="el" href="kprintf_8h-source.html">lib/kprintf.h</a>></code><br> <p> Include dependency graph for ubthread.c:<p><center><img src="ubthread_8c__incl.png" border="0" usemap="#src/sys/kernel/ubthread.c_map" alt=""></center> <map name="src/sys/kernel/ubthread.c_map"> <area href="ubthread_8h.html" shape="rect" coords="415,123,559,150" alt=""> <area href="sched_8h.html" shape="rect" coords="616,174,739,200" alt=""> <area href="time_8h.html" shape="rect" coords="620,72,735,99" alt=""> <area href="exec_8h.html" shape="rect" coords="430,224,544,251" alt=""> <area href="spinlock_8h.html" shape="rect" coords="608,275,747,302" alt=""> <area href="vitals_8h.html" shape="rect" coords="246,72,366,99" alt=""> <area href="kmalloc_8h.html" shape="rect" coords="252,326,359,352" alt=""> <area href="kprintf_8h.html" shape="rect" coords="256,376,355,403" alt=""> <area href="types_8h.html" shape="rect" coords="796,199,916,226" alt=""> <area href="vfs_8h.html" shape="rect" coords="448,72,526,99" alt=""> </map> <p> <a href="ubthread_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>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="ubthread_8c.html#e914fae69538736dc5e494c15ce93a17">ubthread_cond_destroy</a> (<a class="el" href="structubthread__cond.html">ubthread_cond_t</a> *cond)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="ubthread_8c.html#cbb7170a68758468ab5b02512a320112">ubthread_cond_init</a> (<a class="el" href="structubthread__cond.html">ubthread_cond_t</a> *cond, const <a class="el" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> attr)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="ubthread_8c.html#64fb8f5f2da2564a6cae8c9f2c3bde10">ubthread_cond_signal</a> (<a class="el" href="structubthread__cond.html">ubthread_cond_t</a> *cond)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="ubthread_8c.html#996be9a927447a62f7168a082a046c54">ubthread_cond_timedwait</a> (<a class="el" href="structubthread__cond.html">ubthread_cond_t</a> *cond, <a class="el" href="structubthread__mutex.html">ubthread_mutex_t</a> *<a class="el" href="ubthread_8c.html#18b6be9ca0cec4b0643171232d6f10de">mutex</a>, const struct <a class="el" href="structtimespec.html">timespec</a> *abstime)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="ubthread_8c.html#30eb7c156c2422801ddb86326dbc3d81">ubthread_cond_wait</a> (<a class="el" href="structubthread__cond.html">ubthread_cond_t</a> *cond, <a class="el" href="structubthread__mutex.html">ubthread_mutex_t</a> *<a class="el" href="ubthread_8c.html#18b6be9ca0cec4b0643171232d6f10de">mutex</a>)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="ubthread_8c.html#a0af177ef44888f3c93883294207328e">ubthread_create</a> (<a class="el" href="structtaskStruct.html">kTask_t</a> **<a class="el" href="structthread.html">thread</a>, const <a class="el" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> *attr, void(*tproc)(void), void *arg)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="ubthread_8c.html#278f5d5b1e11b6668b75da6a285442e4">ubthread_mutex_destroy</a> (<a class="el" href="structubthread__mutex.html">ubthread_mutex_t</a> *<a class="el" href="ubthread_8c.html#18b6be9ca0cec4b0643171232d6f10de">mutex</a>)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="ubthread_8c.html#b6bfc2169b55532821582f24b68dc855">ubthread_mutex_init</a> (<a class="el" href="structubthread__mutex.html">ubthread_mutex_t</a> *<a class="el" href="ubthread_8c.html#18b6be9ca0cec4b0643171232d6f10de">mutex</a>, const <a class="el" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> attr)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="ubthread_8c.html#a13bf141cd3e9bf0921fbf61ffc637d8">ubthread_mutex_lock</a> (<a class="el" href="structubthread__mutex.html">ubthread_mutex_t</a> *<a class="el" href="ubthread_8c.html#18b6be9ca0cec4b0643171232d6f10de">mutex</a>)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="ubthread_8c.html#fea3530bab360f59c09a49f490d079dd">ubthread_mutex_unlock</a> (<a class="el" href="structubthread__mutex.html">ubthread_mutex_t</a> *<a class="el" href="ubthread_8c.html#18b6be9ca0cec4b0643171232d6f10de">mutex</a>)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structtaskStruct.html">kTask_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="ubthread_8c.html#72a362bc8127b8d63e1107062638664d">ubthread_self</a> ()</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="structubthread__cond__list.html">ubthread_cond_list</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="ubthread_8c.html#c90cec8b766ba40fe62cf0d6328da970">conds</a> = 0x0</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structubthread__mutex__list.html">ubthread_mutex_list</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="ubthread_8c.html#18b6be9ca0cec4b0643171232d6f10de">mutex</a> = 0x0</td></tr> </table> <hr><h2>Function Documentation</h2> <a class="anchor" name="e914fae69538736dc5e494c15ce93a17"></a><!-- doxytag: member="ubthread.c::ubthread_cond_destroy" ref="e914fae69538736dc5e494c15ce93a17" args="(ubthread_cond_t *cond)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int ubthread_cond_destroy </td> <td>(</td> <td class="paramtype"><a class="el" href="structubthread__cond.html">ubthread_cond_t</a> * </td> <td class="paramname"> <em>cond</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="ubthread_8c-source.html#l00064">64</a> of file <a class="el" href="ubthread_8c-source.html">ubthread.c</a>. <p> References <a class="el" href="kmalloc_8c-source.html#l00351">kfree()</a>. <p> Here is the call graph for this function:<p><center><img src="ubthread_8c_e914fae69538736dc5e494c15ce93a17_cgraph.png" border="0" usemap="#ubthread_8c_e914fae69538736dc5e494c15ce93a17_cgraph_map" alt=""></center> <map name="ubthread_8c_e914fae69538736dc5e494c15ce93a17_cgraph_map"> <area href="kmalloc_8h.html#aa9ed6886459604cf73ccdbf6410e487" shape="rect" coords="235,158,291,184" alt=""> <area href="kmalloc_8c.html#eb1c3f1ef8eb9063c2e5c4af488dd2d0" shape="rect" coords="339,56,461,83" alt=""> <area href="kprint_8h.html#b2761bdf0cca73ad0fb5880895210cd8" shape="rect" coords="671,107,737,134" alt=""> <area href="lib_2string_8h.html#ce4b911463887af5e748326323e99a23" shape="rect" coords="361,158,439,184" alt=""> <area href="spinlock_8h.html#2cd9a4502680fb8e7f0fe6b029e558b1" shape="rect" coords="360,208,440,235" alt=""> <area href="spinlock_8h.html#dd996cbbb3b9826dd9c8cf02b66a4c65" shape="rect" coords="352,259,448,286" alt=""> <area href="kpanic_8h.html#db9a182aa071791a306163d50d653deb" shape="rect" coords="527,56,593,83" alt=""> <area href="8259_8h.html#2b9ec30943ddb0a2ef3bd7ccfd2026c0" shape="rect" coords="659,6,749,32" alt=""> <area href="stdarg_8h.html#621577c2df0ad5faa281223c56eeb7a5" shape="rect" coords="668,56,740,83" alt=""> <area href="vsprintf_8c.html#c2f4c669c6f6aa6caa5ab8adb1b07dd0" shape="rect" coords="833,31,908,58" alt=""> <area href="vsprintf_8c.html#3fa7c8ef8597579301cb4b5c59bc6d9a" shape="rect" coords="831,82,911,108" alt=""> <area href="sched_8h.html#08933fe6d593a1c78b9080359f15a0b7" shape="rect" coords="509,183,611,210" alt=""> <area href="spinlock_8h.html#8f9173fadeddafa01754d6cbcc630198" shape="rect" coords="821,234,920,260" alt=""> <area href="sched_8h.html#549a0c1cc47933fa045b200690965cbd" shape="rect" coords="673,183,735,210" alt=""> <area href="sched_8h.html#e969273d772018d111e1f0344eb550f8" shape="rect" coords="797,132,944,159" alt=""> <area href="sched_8h.html#086cc0adc0b6a3860ceeeb5bc5ea94ea" shape="rect" coords="801,183,940,210" alt=""> </map> </div> </div><p> <a class="anchor" name="cbb7170a68758468ab5b02512a320112"></a><!-- doxytag: member="ubthread.c::ubthread_cond_init" ref="cbb7170a68758468ab5b02512a320112" args="(ubthread_cond_t *cond, const uInt32 attr)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int ubthread_cond_init </td> <td>(</td> <td class="paramtype"><a class="el" href="structubthread__cond.html">ubthread_cond_t</a> * </td> <td class="paramname"> <em>cond</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> </td> <td class="paramname"> <em>attr</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="ubthread_8c-source.html#l00048">48</a> of file <a class="el" href="ubthread_8c-source.html">ubthread.c</a>. <p> References <a class="el" href="ubthread_8h-source.html#l00051">ubthread_cond::id</a>, <a class="el" href="kmalloc_8c-source.html#l00247">kmalloc()</a>, <a class="el" href="ubthread_8h-source.html#l00052">ubthread_cond::locked</a>, and <a class="el" href="ubthread_8h-source.html#l00040">UNLOCKED</a>. <p> Here is the call graph for this function:<p><center><img src="ubthread_8c_cbb7170a68758468ab5b02512a320112_cgraph.png" border="0" usemap="#ubthread_8c_cbb7170a68758468ab5b02512a320112_cgraph_map" alt=""></center> <map name="ubthread_8c_cbb7170a68758468ab5b02512a320112_cgraph_map"> <area href="kmalloc_8h.html#150eab2ac4ce4553e21ca10e7f441762" shape="rect" coords="205,122,280,148" alt=""> <area href="kmalloc_8c.html#f6c4ea5cb961c72548d92ff65d7e33a4" shape="rect" coords="329,198,449,224" alt=""> <area href="kprint_8h.html#b2761bdf0cca73ad0fb5880895210cd8" shape="rect" coords="751,46,817,72" alt=""> <area href="spinlock_8h.html#2cd9a4502680fb8e7f0fe6b029e558b1" shape="rect" coords="744,324,824,351" alt=""> <area href="spinlock_8h.html#dd996cbbb3b9826dd9c8cf02b66a4c65" shape="rect" coords="736,223,832,250" alt=""> <area href="kmalloc_8c.html#eb1c3f1ef8eb9063c2e5c4af488dd2d0" shape="rect" coords="328,71,451,98" alt=""> <area href="kpanic_8h.html#db9a182aa071791a306163d50d653deb" shape="rect" coords="560,71,627,98" alt=""> <area href="lib_2string_8h.html#ce4b911463887af5e748326323e99a23" shape="rect" coords="555,172,632,199" alt=""> <area href="paging_8h.html#541f0b43826a40b9e978f5479080bb0e" shape="rect" coords="499,274,688,300" alt=""> </map> </div> </div><p> <a class="anchor" name="64fb8f5f2da2564a6cae8c9f2c3bde10"></a><!-- doxytag: member="ubthread.c::ubthread_cond_signal" ref="64fb8f5f2da2564a6cae8c9f2c3bde10" args="(ubthread_cond_t *cond)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int ubthread_cond_signal </td> <td>(</td> <td class="paramtype"><a class="el" href="structubthread__cond.html">ubthread_cond_t</a> * </td> <td class="paramname"> <em>cond</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="ubthread_8c-source.html#l00125">125</a> of file <a class="el" href="ubthread_8c-source.html">ubthread.c</a>. <p> References <a class="el" href="ubthread_8h-source.html#l00052">ubthread_cond::locked</a>, and <a class="el" href="ubthread_8h-source.html#l00040">UNLOCKED</a>. </div> </div><p> <a class="anchor" name="996be9a927447a62f7168a082a046c54"></a><!-- doxytag: member="ubthread.c::ubthread_cond_timedwait" ref="996be9a927447a62f7168a082a046c54" args="(ubthread_cond_t *cond, ubthread_mutex_t *mutex, const struct timespec *abstime)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int ubthread_cond_timedwait </td> <td>(</td> <td class="paramtype"><a class="el" href="structubthread__cond.html">ubthread_cond_t</a> * </td> <td class="paramname"> <em>cond</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structubthread__mutex.html">ubthread_mutex_t</a> * </td> <td class="paramname"> <em>mutex</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const struct <a class="el" href="structtimespec.html">timespec</a> * </td> <td class="paramname"> <em>abstime</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="ubthread_8c-source.html#l00105">105</a> of file <a class="el" href="ubthread_8c-source.html">ubthread.c</a>. <p> References <a class="el" href="ubthread_8h-source.html#l00057">ubthread_mutex::locked</a>, <a class="el" href="ubthread_8h-source.html#l00052">ubthread_cond::locked</a>, <a class="el" href="ubthread_8c-source.html#l00042">mutex</a>, <a class="el" href="sched_8c-source.html#l00259">sched_yield()</a>, <a class="el" href="timer_8S-source.html#l00035">systemVitals</a>, <a class="el" href="vitals_8h-source.html#l00041">vitalsStruct::sysUptime</a>, and <a class="el" href="ubthread_8h-source.html#l00040">UNLOCKED</a>. <p> Here is the call graph for this function:<p><center><img src="ubthread_8c_996be9a927447a62f7168a082a046c54_cgraph.png" border="0" usemap="#ubthread_8c_996be9a927447a62f7168a082a046c54_cgraph_map" alt=""></center> <map name="ubthread_8c_996be9a927447a62f7168a082a046c54_cgraph_map"> <area href="sched_8h.html#08933fe6d593a1c78b9080359f15a0b7" shape="rect" coords="251,56,352,83" alt=""> <area href="sched_8h.html#549a0c1cc47933fa045b200690965cbd" shape="rect" coords="401,56,463,83" alt=""> <area href="sched_8h.html#e969273d772018d111e1f0344eb550f8" shape="rect" coords="512,6,659,32" alt=""> <area href="sched_8h.html#086cc0adc0b6a3860ceeeb5bc5ea94ea" shape="rect" coords="516,56,655,83" alt=""> <area href="spinlock_8h.html#8f9173fadeddafa01754d6cbcc630198" shape="rect" coords="536,107,635,134" alt=""> </map> </div> </div><p> <a class="anchor" name="30eb7c156c2422801ddb86326dbc3d81"></a><!-- doxytag: member="ubthread.c::ubthread_cond_wait" ref="30eb7c156c2422801ddb86326dbc3d81" args="(ubthread_cond_t *cond, ubthread_mutex_t *mutex)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int ubthread_cond_wait </td> <td>(</td> <td class="paramtype"><a class="el" href="structubthread__cond.html">ubthread_cond_t</a> * </td> <td class="paramname"> <em>cond</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structubthread__mutex.html">ubthread_mutex_t</a> * </td> <td class="paramname"> <em>mutex</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="ubthread_8c-source.html#l00117">117</a> of file <a class="el" href="ubthread_8c-source.html">ubthread.c</a>. <p> References <a class="el" href="ubthread_8h-source.html#l00057">ubthread_mutex::locked</a>, <a class="el" href="ubthread_8h-source.html#l00039">LOCKED</a>, <a class="el" href="ubthread_8h-source.html#l00052">ubthread_cond::locked</a>, <a class="el" href="ubthread_8c-source.html#l00042">mutex</a>, <a class="el" href="sched_8c-source.html#l00259">sched_yield()</a>, and <a class="el" href="ubthread_8h-source.html#l00040">UNLOCKED</a>. <p> Here is the call graph for this function:<p><center><img src="ubthread_8c_30eb7c156c2422801ddb86326dbc3d81_cgraph.png" border="0" usemap="#ubthread_8c_30eb7c156c2422801ddb86326dbc3d81_cgraph_map" alt=""></center> <map name="ubthread_8c_30eb7c156c2422801ddb86326dbc3d81_cgraph_map"> <area href="sched_8h.html#08933fe6d593a1c78b9080359f15a0b7" shape="rect" coords="214,56,315,83" alt=""> <area href="sched_8h.html#549a0c1cc47933fa045b200690965cbd" shape="rect" coords="364,56,426,83" alt=""> <area href="sched_8h.html#e969273d772018d111e1f0344eb550f8" shape="rect" coords="475,6,622,32" alt=""> <area href="sched_8h.html#086cc0adc0b6a3860ceeeb5bc5ea94ea" shape="rect" coords="479,56,618,83" alt=""> <area href="spinlock_8h.html#8f9173fadeddafa01754d6cbcc630198" shape="rect" coords="499,107,598,134" alt=""> </map> </div> </div><p> <a class="anchor" name="a0af177ef44888f3c93883294207328e"></a><!-- doxytag: member="ubthread.c::ubthread_create" ref="a0af177ef44888f3c93883294207328e" args="(kTask_t **thread, const uInt32 *attr, void(*tproc)(void), void *arg)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int ubthread_create </td> <td>(</td> <td class="paramtype"><a class="el" href="structtaskStruct.html">kTask_t</a> ** </td> <td class="paramname"> <em>thread</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> * </td> <td class="paramname"> <em>attr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">void(*)(void) </td> <td class="paramname"> <em>tproc</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">void * </td> <td class="paramname"> <em>arg</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="ubthread_8c-source.html#l00076">76</a> of file <a class="el" href="ubthread_8c-source.html">ubthread.c</a>. <p> References <a class="el" href="exec_8c-source.html#l00055">execThread()</a>, <a class="el" href="kmalloc_8c-source.html#l00247">kmalloc()</a>, and <a class="el" href="start_8S-source.html#l00051">x2000</a>. <p> Here is the call graph for this function:<p><center><img src="ubthread_8c_a0af177ef44888f3c93883294207328e_cgraph.png" border="0" usemap="#ubthread_8c_a0af177ef44888f3c93883294207328e_cgraph_map" alt=""></center> <map name="ubthread_8c_a0af177ef44888f3c93883294207328e_cgraph_map"> <area href="exec_8h.html#e9945e606ad208cb00dc9166d06452b4" shape="rect" coords="187,120,288,147" alt=""> <area href="kmalloc_8h.html#150eab2ac4ce4553e21ca10e7f441762" shape="rect" coords="540,208,615,235" alt=""> <area href="kpanic_8h.html#db9a182aa071791a306163d50d653deb" shape="rect" coords="544,56,611,83" alt=""> <area href="sched_8h.html#51101e12c9236ea1286477695c110482" shape="rect" coords="338,12,468,39" alt=""> <area href="sched_8h.html#92458df2063761371869cdfe0c9b4ee3" shape="rect" coords="343,151,463,178" alt=""> <area href="8259_8h.html#2b9ec30943ddb0a2ef3bd7ccfd2026c0" shape="rect" coords="688,63,779,90" alt=""> <area href="kprint_8h.html#b2761bdf0cca73ad0fb5880895210cd8" shape="rect" coords="700,139,767,166" alt=""> <area href="stdarg_8h.html#621577c2df0ad5faa281223c56eeb7a5" shape="rect" coords="698,12,770,39" alt=""> <area href="sched_8h.html#9cf37ade4c1f6184b33014ac2015e8ed" shape="rect" coords="519,6,636,32" alt=""> <area href="spinlock_8h.html#2cd9a4502680fb8e7f0fe6b029e558b1" shape="rect" coords="694,202,774,228" alt=""> <area href="spinlock_8h.html#dd996cbbb3b9826dd9c8cf02b66a4c65" shape="rect" coords="686,259,782,286" alt=""> <area href="lib_2string_8h.html#ce4b911463887af5e748326323e99a23" shape="rect" coords="539,158,616,184" alt=""> </map> </div> </div><p> <a class="anchor" name="278f5d5b1e11b6668b75da6a285442e4"></a><!-- doxytag: member="ubthread.c::ubthread_mutex_destroy" ref="278f5d5b1e11b6668b75da6a285442e4" args="(ubthread_mutex_t *mutex)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int ubthread_mutex_destroy </td> <td>(</td> <td class="paramtype"><a class="el" href="structubthread__mutex.html">ubthread_mutex_t</a> * </td> <td class="paramname"> <em>mutex</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="ubthread_8c-source.html#l00070">70</a> of file <a class="el" href="ubthread_8c-source.html">ubthread.c</a>. <p> References <a class="el" href="kmalloc_8c-source.html#l00351">kfree()</a>, and <a class="el" href="ubthread_8c-source.html#l00042">mutex</a>. <p> Here is the call graph for this function:<p><center><img src="ubthread_8c_278f5d5b1e11b6668b75da6a285442e4_cgraph.png" border="0" usemap="#ubthread_8c_278f5d5b1e11b6668b75da6a285442e4_cgraph_map" alt=""></center> <map name="ubthread_8c_278f5d5b1e11b6668b75da6a285442e4_cgraph_map"> <area href="kmalloc_8h.html#aa9ed6886459604cf73ccdbf6410e487" shape="rect" coords="245,158,301,184" alt=""> <area href="kmalloc_8c.html#eb1c3f1ef8eb9063c2e5c4af488dd2d0" shape="rect" coords="349,56,472,83" alt=""> <area href="kprint_8h.html#b2761bdf0cca73ad0fb5880895210cd8" shape="rect" coords="681,107,748,134" alt=""> <area href="lib_2string_8h.html#ce4b911463887af5e748326323e99a23" shape="rect" coords="372,158,449,184" alt=""> <area href="spinlock_8h.html#2cd9a4502680fb8e7f0fe6b029e558b1" shape="rect" coords="371,208,451,235" alt=""> <area href="spinlock_8h.html#dd996cbbb3b9826dd9c8cf02b66a4c65" shape="rect" coords="363,259,459,286" alt=""> <area href="kpanic_8h.html#db9a182aa071791a306163d50d653deb" shape="rect" coords="537,56,604,83" alt=""> <area href="8259_8h.html#2b9ec30943ddb0a2ef3bd7ccfd2026c0" shape="rect" coords="669,6,760,32" alt=""> <area href="stdarg_8h.html#621577c2df0ad5faa281223c56eeb7a5" shape="rect" coords="679,56,751,83" alt=""> <area href="vsprintf_8c.html#c2f4c669c6f6aa6caa5ab8adb1b07dd0" shape="rect" coords="844,31,919,58" alt=""> <area href="vsprintf_8c.html#3fa7c8ef8597579301cb4b5c59bc6d9a" shape="rect" coords="841,82,921,108" alt=""> <area href="sched_8h.html#08933fe6d593a1c78b9080359f15a0b7" shape="rect" coords="520,183,621,210" alt=""> <area href="spinlock_8h.html#8f9173fadeddafa01754d6cbcc630198" shape="rect" coords="832,234,931,260" alt=""> <area href="sched_8h.html#549a0c1cc47933fa045b200690965cbd" shape="rect" coords="684,183,745,210" alt=""> <area href="sched_8h.html#e969273d772018d111e1f0344eb550f8" shape="rect" coords="808,132,955,159" alt=""> <area href="sched_8h.html#086cc0adc0b6a3860ceeeb5bc5ea94ea" shape="rect" coords="812,183,951,210" alt=""> </map> </div> </div><p> <a class="anchor" name="b6bfc2169b55532821582f24b68dc855"></a><!-- doxytag: member="ubthread.c::ubthread_mutex_init" ref="b6bfc2169b55532821582f24b68dc855" args="(ubthread_mutex_t *mutex, const uInt32 attr)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int ubthread_mutex_init </td> <td>(</td> <td class="paramtype"><a class="el" href="structubthread__mutex.html">ubthread_mutex_t</a> * </td> <td class="paramname"> <em>mutex</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> </td> <td class="paramname"> <em>attr</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="ubthread_8c-source.html#l00056">56</a> of file <a class="el" href="ubthread_8c-source.html">ubthread.c</a>. <p> References <a class="el" href="ubthread_8h-source.html#l00056">ubthread_mutex::id</a>, <a class="el" href="kmalloc_8c-source.html#l00247">kmalloc()</a>, <a class="el" href="ubthread_8h-source.html#l00057">ubthread_mutex::locked</a>, <a class="el" href="ubthread_8c-source.html#l00042">mutex</a>, and <a class="el" href="ubthread_8h-source.html#l00040">UNLOCKED</a>. <p> Here is the call graph for this function:<p><center><img src="ubthread_8c_b6bfc2169b55532821582f24b68dc855_cgraph.png" border="0" usemap="#ubthread_8c_b6bfc2169b55532821582f24b68dc855_cgraph_map" alt=""></center> <map name="ubthread_8c_b6bfc2169b55532821582f24b68dc855_cgraph_map"> <area href="kmalloc_8h.html#150eab2ac4ce4553e21ca10e7f441762" shape="rect" coords="216,122,291,148" alt=""> <area href="kmalloc_8c.html#f6c4ea5cb961c72548d92ff65d7e33a4" shape="rect" coords="340,198,460,224" alt=""> <area href="kprint_8h.html#b2761bdf0cca73ad0fb5880895210cd8" shape="rect" coords="761,46,828,72" alt=""> <area href="spinlock_8h.html#2cd9a4502680fb8e7f0fe6b029e558b1" shape="rect" coords="755,324,835,351" alt=""> <area href="spinlock_8h.html#dd996cbbb3b9826dd9c8cf02b66a4c65" shape="rect" coords="747,223,843,250" alt=""> <area href="kmalloc_8c.html#eb1c3f1ef8eb9063c2e5c4af488dd2d0" shape="rect" coords="339,71,461,98" alt=""> <area href="kpanic_8h.html#db9a182aa071791a306163d50d653deb" shape="rect" coords="571,71,637,98" alt=""> <area href="lib_2string_8h.html#ce4b911463887af5e748326323e99a23" shape="rect" coords="565,172,643,199" alt=""> <area href="paging_8h.html#541f0b43826a40b9e978f5479080bb0e" shape="rect" coords="509,274,699,300" alt=""> </map> </div> </div><p> <a class="anchor" name="a13bf141cd3e9bf0921fbf61ffc637d8"></a><!-- doxytag: member="ubthread.c::ubthread_mutex_lock" ref="a13bf141cd3e9bf0921fbf61ffc637d8" args="(ubthread_mutex_t *mutex)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int ubthread_mutex_lock </td> <td>(</td> <td class="paramtype"><a class="el" href="structubthread__mutex.html">ubthread_mutex_t</a> * </td> <td class="paramname"> <em>mutex</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="ubthread_8c-source.html#l00081">81</a> of file <a class="el" href="ubthread_8c-source.html">ubthread.c</a>. <p> References <a class="el" href="sched_8c-source.html#l00051">_current</a>, <a class="el" href="sched_8h-source.html#l00055">taskStruct::id</a>, <a class="el" href="kprintf_8c-source.html#l00038">kprintf()</a>, <a class="el" href="ubthread_8h-source.html#l00039">LOCKED</a>, <a class="el" href="ubthread_8h-source.html#l00057">ubthread_mutex::locked</a>, <a class="el" href="ubthread_8c-source.html#l00042">mutex</a>, and <a class="el" href="ubthread_8h-source.html#l00058">ubthread_mutex::pid</a>. <p> Here is the call graph for this function:<p><center><img src="ubthread_8c_a13bf141cd3e9bf0921fbf61ffc637d8_cgraph.png" border="0" usemap="#ubthread_8c_a13bf141cd3e9bf0921fbf61ffc637d8_cgraph_map" alt=""></center> <map name="ubthread_8c_a13bf141cd3e9bf0921fbf61ffc637d8_cgraph_map"> <area href="kprint_8h.html#b2761bdf0cca73ad0fb5880895210cd8" shape="rect" coords="221,5,288,32" alt=""> </map> </div> </div><p> <a class="anchor" name="fea3530bab360f59c09a49f490d079dd"></a><!-- doxytag: member="ubthread.c::ubthread_mutex_unlock" ref="fea3530bab360f59c09a49f490d079dd" args="(ubthread_mutex_t *mutex)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int ubthread_mutex_unlock </td> <td>(</td> <td class="paramtype"><a class="el" href="structubthread__mutex.html">ubthread_mutex_t</a> * </td> <td class="paramname"> <em>mutex</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="ubthread_8c-source.html#l00092">92</a> of file <a class="el" href="ubthread_8c-source.html">ubthread.c</a>. <p> References <a class="el" href="sched_8c-source.html#l00051">_current</a>, <a class="el" href="sched_8h-source.html#l00055">taskStruct::id</a>, <a class="el" href="ubthread_8h-source.html#l00057">ubthread_mutex::locked</a>, <a class="el" href="ubthread_8c-source.html#l00042">mutex</a>, <a class="el" href="ubthread_8h-source.html#l00058">ubthread_mutex::pid</a>, and <a class="el" href="ubthread_8h-source.html#l00040">UNLOCKED</a>. </div> </div><p> <a class="anchor" name="72a362bc8127b8d63e1107062638664d"></a><!-- doxytag: member="ubthread.c::ubthread_self" ref="72a362bc8127b8d63e1107062638664d" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structtaskStruct.html">kTask_t</a>* ubthread_self </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="ubthread_8c-source.html#l00044">44</a> of file <a class="el" href="ubthread_8c-source.html">ubthread.c</a>. <p> References <a class="el" href="sched_8c-source.html#l00051">_current</a>. </div> </div><p> <hr><h2>Variable Documentation</h2> <a class="anchor" name="c90cec8b766ba40fe62cf0d6328da970"></a><!-- doxytag: member="ubthread.c::conds" ref="c90cec8b766ba40fe62cf0d6328da970" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">struct <a class="el" href="structubthread__cond__list.html">ubthread_cond_list</a>* <a class="el" href="ubthread_8c.html#c90cec8b766ba40fe62cf0d6328da970">conds</a> = 0x0 </td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="ubthread_8c-source.html#l00041">41</a> of file <a class="el" href="ubthread_8c-source.html">ubthread.c</a>. </div> </div><p> <a class="anchor" name="18b6be9ca0cec4b0643171232d6f10de"></a><!-- doxytag: member="ubthread.c::mutex" ref="18b6be9ca0cec4b0643171232d6f10de" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">struct <a class="el" href="structubthread__mutex__list.html">ubthread_mutex_list</a>* <a class="el" href="ubthread_8c.html#18b6be9ca0cec4b0643171232d6f10de">mutex</a> = 0x0 </td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="ubthread_8c-source.html#l00042">42</a> of file <a class="el" href="ubthread_8c-source.html">ubthread.c</a>. <p> Referenced by <a class="el" href="ubthread_8c-source.html#l00105">ubthread_cond_timedwait()</a>, <a class="el" href="ubthread_8c-source.html#l00117">ubthread_cond_wait()</a>, <a class="el" href="ubthread_8c-source.html#l00070">ubthread_mutex_destroy()</a>, <a class="el" href="ubthread_8c-source.html#l00056">ubthread_mutex_init()</a>, <a class="el" href="ubthread_8c-source.html#l00081">ubthread_mutex_lock()</a>, and <a class="el" href="ubthread_8c-source.html#l00092">ubthread_mutex_unlock()</a>. </div> </div><p> <hr size="1"><address style="align: right;"><small>Generated on Fri Dec 15 11:24:27 2006 for UbixOS V2 by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address> </body> </html>