<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.16"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>UbixOS: Semaphores</title> <link href="../../tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="../../jquery.js"></script> <script type="text/javascript" src="../../dynsections.js"></script> <link href="../../navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="../../resize.js"></script> <script type="text/javascript" src="../../navtreedata.js"></script> <script type="text/javascript" src="../../navtree.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(initResizable); /* @license-end */</script> <link href="../../doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">UbixOS  <span id="projectnumber">2.0</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.16 --> <script type="text/javascript" src="../../menudata.js"></script> <script type="text/javascript" src="../../menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('../../',false,false,'search.php','Search'); }); /* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(function(){initNavTree('da/d3a/group__sys__sem.html','../../');}); /* @license-end */ </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">Semaphores<div class="ingroups"><a class="el" href="../../db/d82/group__sys__layer.html">Porting (system abstraction layer)</a> » <a class="el" href="../../de/d7c/group__sys__os.html">OS abstraction layer</a></div></div> </div> </div><!--header--> <div class="contents"> <div class="dynheader"> Collaboration diagram for Semaphores:</div> <div class="dyncontent"> <div class="center"><img src="../../da/d3a/group__sys__sem.png" border="0" usemap="#da_2d3a_2group____sys____sem" alt=""/></div> <map name="da_2d3a_2group____sys____sem" id="da_2d3a_2group____sys____sem"> <area shape="rect" href="../../de/d7c/group__sys__os.html" title=" " alt="" coords="5,5,147,31"/> <area shape="rect" title=" " alt="" coords="195,5,289,31"/> </map> </div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:ga28aa725e8a36dd0cfde89875af4f3ec9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d3a/group__sys__sem.html#ga28aa725e8a36dd0cfde89875af4f3ec9">sys_arch_sem_wait</a> (struct <a class="el" href="../../d4/da3/structsys__sem.html">sys_sem</a> **s, <a class="el" href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a> timeout)</td></tr> <tr class="separator:ga28aa725e8a36dd0cfde89875af4f3ec9"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga4d02e29e5dfa092559efc04dee985822"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d3a/group__sys__sem.html#ga4d02e29e5dfa092559efc04dee985822">sys_sem_free</a> (<a class="el" href="../../d2/d28/sem_8h.html#a900e36da93bb688c29fc8148f2f44e04">sys_sem_t</a> **sem)</td></tr> <tr class="separator:ga4d02e29e5dfa092559efc04dee985822"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gadb68acad14b34550b9891bc11bbf4e63"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d2/de7/group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d3a/group__sys__sem.html#gadb68acad14b34550b9891bc11bbf4e63">sys_sem_new</a> (<a class="el" href="../../d2/d28/sem_8h.html#a900e36da93bb688c29fc8148f2f44e04">sys_sem_t</a> **sem, <a class="el" href="../../de/d8c/group__compiler__abstraction.html#ga4caecabca98b43919dd11be1c0d4cd8e">u8_t</a> count)</td></tr> <tr class="separator:gadb68acad14b34550b9891bc11bbf4e63"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga6b618ddf0c8e73302f1dae7821661457"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d3a/group__sys__sem.html#ga6b618ddf0c8e73302f1dae7821661457">sys_sem_set_invalid</a> (struct <a class="el" href="../../d4/da3/structsys__sem.html">sys_sem</a> **s)</td></tr> <tr class="separator:ga6b618ddf0c8e73302f1dae7821661457"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gaff1dd2af219b75ae812e0b1660bd7455"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d3a/group__sys__sem.html#gaff1dd2af219b75ae812e0b1660bd7455">sys_sem_signal</a> (struct <a class="el" href="../../d4/da3/structsys__sem.html">sys_sem</a> **s)</td></tr> <tr class="separator:gaff1dd2af219b75ae812e0b1660bd7455"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gac7ff314270976b80559d043f6098817b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d3a/group__sys__sem.html#gac7ff314270976b80559d043f6098817b">sys_sem_valid</a> (struct <a class="el" href="../../d4/da3/structsys__sem.html">sys_sem</a> **s)</td></tr> <tr class="separator:gac7ff314270976b80559d043f6098817b"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <h2 class="groupheader">Function Documentation</h2> <a id="ga28aa725e8a36dd0cfde89875af4f3ec9"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga28aa725e8a36dd0cfde89875af4f3ec9">◆ </a></span>sys_arch_sem_wait()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a> sys_arch_sem_wait </td> <td>(</td> <td class="paramtype">struct <a class="el" href="../../d4/da3/structsys__sem.html">sys_sem</a> ** </td> <td class="paramname"><em>s</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a> </td> <td class="paramname"><em>timeout</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Wait for a semaphore for the specified timeout </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">sem</td><td>the semaphore to wait for </td></tr> <tr><td class="paramname">timeout</td><td>timeout in milliseconds to wait (0 = wait forever) </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>time (in milliseconds) waited for the semaphore or SYS_ARCH_TIMEOUT on timeout </dd></dl> <p class="definition">Definition at line <a class="el" href="../../d9/d56/sys__arch_8c_source.html#l00104">104</a> of file <a class="el" href="../../d9/d56/sys__arch_8c_source.html">sys_arch.c</a>.</p> <p class="reference">References <a class="el" href="../../db/d16/debug_8h_source.html#l00116">LWIP_ASSERT</a>, <a class="el" href="../../d2/d28/sem_8h_source.html#l00039">mutex</a>, <a class="el" href="../../d6/d8a/fat__string_8h_source.html#l00017">NULL</a>, <a class="el" href="../../d2/d28/sem_8h_source.html#l00037">signaled</a>, and <a class="el" href="../../d5/d9a/ubthread_8c_source.html#l00088">ubthread_mutex_lock()</a>.</p> <p class="reference">Referenced by <a class="el" href="../../d8/d91/sys_8c_source.html#l00093">sys_msleep()</a>.</p> <div class="dynheader"> Here is the call graph for this function:</div> <div class="dyncontent"> <div class="center"><img src="../../da/d3a/group__sys__sem_ga28aa725e8a36dd0cfde89875af4f3ec9_cgraph.png" border="0" usemap="#da/d3a/group__sys__sem_ga28aa725e8a36dd0cfde89875af4f3ec9_cgraph" alt=""/></div> <map name="da/d3a/group__sys__sem_ga28aa725e8a36dd0cfde89875af4f3ec9_cgraph" id="da/d3a/group__sys__sem_ga28aa725e8a36dd0cfde89875af4f3ec9_cgraph"> <area shape="rect" title=" " alt="" coords="5,107,143,133"/> <area shape="rect" href="../../dd/d1b/ubthread_8h.html#aa13bf141cd3e9bf0921fbf61ffc637d8" title=" " alt="" coords="191,107,337,133"/> <area shape="rect" href="../../dc/d94/armv6_2kpanic_8c.html#adb9a182aa071791a306163d50d653deb" title="print panic message and halt system" alt="" coords="385,81,445,108"/> <area shape="rect" href="../../da/d28/kprintf_8h.html#a20b56810edb62a6fe59917015c30848f" title=" " alt="" coords="387,132,444,159"/> <area shape="rect" href="../../dd/d78/video_8h.html#a5429378b96a24fadfd2d1f8d777eb95a" title=" " alt="" coords="499,81,554,108"/> <area shape="rect" href="../../df/d87/kprintf_8c.html#a3093cdac4668a4ccffdd7f77270888b7" title=" " alt="" coords="495,132,558,159"/> <area shape="rect" href="../../da/d28/kprintf_8h.html#a3b4a66bf1f6583e65660f281b6014aa1" title=" " alt="" coords="493,183,560,209"/> <area shape="rect" href="../../dc/dac/io_8h.html#a77b934268de1b3ecdcf3f275413b3108" title="input one byte from specified port" alt="" coords="612,5,693,32"/> <area shape="rect" href="../../dc/dac/io_8h.html#a8acc1a06073db2e7b92ffbd00fbd0cf1" title="outputut one byte to specified port" alt="" coords="608,56,697,83"/> <area shape="rect" href="../../dd/d71/tty_8h.html#a4f96ccac7e60296ef496008d8cbed0ff" title=" " alt="" coords="621,107,685,133"/> <area shape="rect" href="../../dd/d71/tty_8h.html#ad96f57a7c113d3cfa76ee5fed6de33c0" title=" " alt="" coords="618,157,687,184"/> <area shape="rect" href="../../dc/d88/armv6_2spinlock_8c.html#a71f03d2ba55111c715b6068254847a53" title=" " alt="" coords="745,157,820,184"/> <area shape="rect" href="../../d3/d02/armv6_2sched_8c.html#a08933fe6d593a1c78b9080359f15a0b7" title=" " alt="" coords="869,132,959,159"/> <area shape="rect" href="../../dc/d88/armv6_2spinlock_8c.html#a740766af5da58616f700fffab6768a78" title=" " alt="" coords="868,183,960,209"/> </map> </div> </div> </div> <a id="ga4d02e29e5dfa092559efc04dee985822"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga4d02e29e5dfa092559efc04dee985822">◆ </a></span>sys_sem_free()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void sys_sem_free </td> <td>(</td> <td class="paramtype"><a class="el" href="../../d2/d28/sem_8h.html#a900e36da93bb688c29fc8148f2f44e04">sys_sem_t</a> ** </td> <td class="paramname"><em>sem</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Delete a semaphore </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">sem</td><td>semaphore to delete </td></tr> </table> </dd> </dl> <p class="definition">Definition at line <a class="el" href="../../d9/d56/sys__arch_8c_source.html#l00075">75</a> of file <a class="el" href="../../d9/d56/sys__arch_8c_source.html">sys_arch.c</a>.</p> <p class="reference">References <a class="el" href="../../d6/d8a/fat__string_8h_source.html#l00017">NULL</a>, <a class="el" href="../../d2/d0b/sem_8c_source.html#l00087">sem_destroy()</a>, and <a class="el" href="../../df/dc7/sys__arch_8h_source.html#l00008">SYS_SEM_NULL</a>.</p> <p class="reference">Referenced by <a class="el" href="../../d8/d91/sys_8c_source.html#l00093">sys_msleep()</a>.</p> <div class="dynheader"> Here is the call graph for this function:</div> <div class="dyncontent"> <div class="center"><img src="../../da/d3a/group__sys__sem_ga4d02e29e5dfa092559efc04dee985822_cgraph.png" border="0" usemap="#da/d3a/group__sys__sem_ga4d02e29e5dfa092559efc04dee985822_cgraph" alt=""/></div> <map name="da/d3a/group__sys__sem_ga4d02e29e5dfa092559efc04dee985822_cgraph" id="da/d3a/group__sys__sem_ga4d02e29e5dfa092559efc04dee985822_cgraph"> <area shape="rect" title=" " alt="" coords="5,26,108,53"/> <area shape="rect" href="../../d2/d28/sem_8h.html#adcce987e1dbe6b3740a4b8f1a49c680f" title=" " alt="" coords="156,26,253,53"/> <area shape="rect" href="../../d4/d03/kmalloc_8h.html#aaa9ed6886459604cf73ccdbf6410e487" title=" " alt="" coords="515,26,565,53"/> <area shape="rect" href="../../dd/d1b/ubthread_8h.html#ae914fae69538736dc5e494c15ce93a17" title=" " alt="" coords="305,26,463,53"/> <area shape="rect" href="../../dd/d1b/ubthread_8h.html#a278f5d5b1e11b6668b75da6a285442e4" title=" " alt="" coords="301,77,467,103"/> </map> </div> </div> </div> <a id="gadb68acad14b34550b9891bc11bbf4e63"></a> <h2 class="memtitle"><span class="permalink"><a href="#gadb68acad14b34550b9891bc11bbf4e63">◆ </a></span>sys_sem_new()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="../../d2/de7/group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> sys_sem_new </td> <td>(</td> <td class="paramtype"><a class="el" href="../../d2/d28/sem_8h.html#a900e36da93bb688c29fc8148f2f44e04">sys_sem_t</a> ** </td> <td class="paramname"><em>sem</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="../../de/d8c/group__compiler__abstraction.html#ga4caecabca98b43919dd11be1c0d4cd8e">u8_t</a> </td> <td class="paramname"><em>count</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Create a new semaphore </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">sem</td><td>pointer to the semaphore to create </td></tr> <tr><td class="paramname">count</td><td>initial count of the semaphore </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>ERR_OK if successful, another err_t otherwise </dd></dl> <p class="definition">Definition at line <a class="el" href="../../d9/d56/sys__arch_8c_source.html#l00052">52</a> of file <a class="el" href="../../d9/d56/sys__arch_8c_source.html">sys_arch.c</a>.</p> <p class="reference">References <a class="el" href="../../d2/d28/sem_8h_source.html#l00038">cond</a>, <a class="el" href="../../d6/d40/err_8h_source.html#l00063">ERR_OK</a>, <a class="el" href="../../d3/d1a/kmalloc_8c_source.html#l00241">kmalloc()</a>, <a class="el" href="../../df/d87/kprintf_8c_source.html#l00259">kprintf()</a>, <a class="el" href="../../d2/d28/sem_8h_source.html#l00039">mutex</a>, <a class="el" href="../../d6/d8a/fat__string_8h_source.html#l00017">NULL</a>, <a class="el" href="../../d2/d0b/sem_8c_source.html#l00056">sem_init()</a>, <a class="el" href="../../d2/d28/sem_8h_source.html#l00037">signaled</a>, <a class="el" href="../../dd/d1b/ubthread_8h.html#acbb7170a68758468ab5b02512a320112">ubthread_cond_init()</a>, and <a class="el" href="../../dd/d1b/ubthread_8h.html#ab6bfc2169b55532821582f24b68dc855">ubthread_mutex_init()</a>.</p> <p class="reference">Referenced by <a class="el" href="../../d8/d91/sys_8c_source.html#l00093">sys_msleep()</a>, and <a class="el" href="../../d2/d55/tcpip_8c_source.html#l00356">tcpip_api_call()</a>.</p> <div class="dynheader"> Here is the call graph for this function:</div> <div class="dyncontent"> <div class="center"><img src="../../da/d3a/group__sys__sem_gadb68acad14b34550b9891bc11bbf4e63_cgraph.png" border="0" usemap="#da/d3a/group__sys__sem_gadb68acad14b34550b9891bc11bbf4e63_cgraph" alt=""/></div> <map name="da/d3a/group__sys__sem_gadb68acad14b34550b9891bc11bbf4e63_cgraph" id="da/d3a/group__sys__sem_gadb68acad14b34550b9891bc11bbf4e63_cgraph"> <area shape="rect" title=" " alt="" coords="5,132,111,159"/> <area shape="rect" href="../../d4/d03/kmalloc_8h.html#a150eab2ac4ce4553e21ca10e7f441762" title=" " alt="" coords="313,31,380,57"/> <area shape="rect" href="../../da/d28/kprintf_8h.html#a20b56810edb62a6fe59917015c30848f" title=" " alt="" coords="318,132,375,159"/> <area shape="rect" href="../../d2/d28/sem_8h.html#a741be298cbcc3eab1747e8b9b239d5f0" title=" " alt="" coords="159,132,229,159"/> <area shape="rect" href="../../dd/d1b/ubthread_8h.html#acbb7170a68758468ab5b02512a320112" title=" " alt="" coords="281,183,412,209"/> <area shape="rect" href="../../dd/d1b/ubthread_8h.html#ab6bfc2169b55532821582f24b68dc855" title=" " alt="" coords="277,233,416,260"/> <area shape="rect" href="../../dc/d88/armv6_2spinlock_8c.html#a71f03d2ba55111c715b6068254847a53" title=" " alt="" coords="716,31,791,57"/> <area shape="rect" href="../../d3/d02/armv6_2sched_8c.html#a08933fe6d593a1c78b9080359f15a0b7" title=" " alt="" coords="839,5,930,32"/> <area shape="rect" href="../../dc/d88/armv6_2spinlock_8c.html#a740766af5da58616f700fffab6768a78" title=" " alt="" coords="839,56,931,83"/> <area shape="rect" href="../../dd/d78/video_8h.html#a5429378b96a24fadfd2d1f8d777eb95a" title=" " alt="" coords="470,107,525,133"/> <area shape="rect" href="../../df/d87/kprintf_8c.html#a3093cdac4668a4ccffdd7f77270888b7" title=" " alt="" coords="466,157,529,184"/> <area shape="rect" href="../../da/d28/kprintf_8h.html#a3b4a66bf1f6583e65660f281b6014aa1" title=" " alt="" coords="464,208,531,235"/> <area shape="rect" href="../../dc/dac/io_8h.html#a77b934268de1b3ecdcf3f275413b3108" title="input one byte from specified port" alt="" coords="583,107,664,133"/> <area shape="rect" href="../../dc/dac/io_8h.html#a8acc1a06073db2e7b92ffbd00fbd0cf1" title="outputut one byte to specified port" alt="" coords="579,157,668,184"/> <area shape="rect" href="../../dd/d71/tty_8h.html#a4f96ccac7e60296ef496008d8cbed0ff" title=" " alt="" coords="591,208,655,235"/> <area shape="rect" href="../../dd/d71/tty_8h.html#ad96f57a7c113d3cfa76ee5fed6de33c0" title=" " alt="" coords="589,56,658,83"/> </map> </div> </div> </div> <a id="ga6b618ddf0c8e73302f1dae7821661457"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga6b618ddf0c8e73302f1dae7821661457">◆ </a></span>sys_sem_set_invalid()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void sys_sem_set_invalid </td> <td>(</td> <td class="paramtype">struct <a class="el" href="../../d4/da3/structsys__sem.html">sys_sem</a> ** </td> <td class="paramname"><em>s</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Set a semaphore invalid so that sys_sem_valid returns 0 </p> <p class="definition">Definition at line <a class="el" href="../../d9/d56/sys__arch_8c_source.html#l00139">139</a> of file <a class="el" href="../../d9/d56/sys__arch_8c_source.html">sys_arch.c</a>.</p> </div> </div> <a id="gaff1dd2af219b75ae812e0b1660bd7455"></a> <h2 class="memtitle"><span class="permalink"><a href="#gaff1dd2af219b75ae812e0b1660bd7455">◆ </a></span>sys_sem_signal()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void sys_sem_signal </td> <td>(</td> <td class="paramtype">struct <a class="el" href="../../d4/da3/structsys__sem.html">sys_sem</a> ** </td> <td class="paramname"><em>s</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Signals a semaphore </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">sem</td><td>the semaphore to signal </td></tr> </table> </dd> </dl> <p class="definition">Definition at line <a class="el" href="../../d9/d56/sys__arch_8c_source.html#l00088">88</a> of file <a class="el" href="../../d9/d56/sys__arch_8c_source.html">sys_arch.c</a>.</p> <p class="reference">References <a class="el" href="../../d2/d28/sem_8h_source.html#l00038">cond</a>, <a class="el" href="../../db/d16/debug_8h_source.html#l00116">LWIP_ASSERT</a>, <a class="el" href="../../d2/d28/sem_8h_source.html#l00039">mutex</a>, <a class="el" href="../../d6/d8a/fat__string_8h_source.html#l00017">NULL</a>, <a class="el" href="../../d2/d28/sem_8h_source.html#l00037">signaled</a>, <a class="el" href="../../d5/d9a/ubthread_8c_source.html#l00164">ubthread_cond_broadcast()</a>, <a class="el" href="../../d5/d9a/ubthread_8c_source.html#l00088">ubthread_mutex_lock()</a>, and <a class="el" href="../../d5/d9a/ubthread_8c_source.html#l00109">ubthread_mutex_unlock()</a>.</p> <div class="dynheader"> Here is the call graph for this function:</div> <div class="dyncontent"> <div class="center"><img src="../../da/d3a/group__sys__sem_gaff1dd2af219b75ae812e0b1660bd7455_cgraph.png" border="0" usemap="#da/d3a/group__sys__sem_gaff1dd2af219b75ae812e0b1660bd7455_cgraph" alt=""/></div> <map name="da/d3a/group__sys__sem_gaff1dd2af219b75ae812e0b1660bd7455_cgraph" id="da/d3a/group__sys__sem_gaff1dd2af219b75ae812e0b1660bd7455_cgraph"> <area shape="rect" title=" " alt="" coords="5,81,121,108"/> <area shape="rect" href="../../dd/d1b/ubthread_8h.html#aeb2f756a095ecfddad31354f819623ee" title=" " alt="" coords="169,31,340,57"/> <area shape="rect" href="../../dd/d1b/ubthread_8h.html#aa13bf141cd3e9bf0921fbf61ffc637d8" title=" " alt="" coords="181,132,328,159"/> <area shape="rect" href="../../dd/d1b/ubthread_8h.html#afea3530bab360f59c09a49f490d079dd" title=" " alt="" coords="175,81,335,108"/> <area shape="rect" href="../../dc/d94/armv6_2kpanic_8c.html#adb9a182aa071791a306163d50d653deb" title="print panic message and halt system" alt="" coords="388,81,448,108"/> <area shape="rect" href="../../da/d28/kprintf_8h.html#a20b56810edb62a6fe59917015c30848f" title=" " alt="" coords="389,132,447,159"/> <area shape="rect" href="../../dd/d78/video_8h.html#a5429378b96a24fadfd2d1f8d777eb95a" title=" " alt="" coords="502,81,557,108"/> <area shape="rect" href="../../df/d87/kprintf_8c.html#a3093cdac4668a4ccffdd7f77270888b7" title=" " alt="" coords="498,132,561,159"/> <area shape="rect" href="../../da/d28/kprintf_8h.html#a3b4a66bf1f6583e65660f281b6014aa1" title=" " alt="" coords="496,183,563,209"/> <area shape="rect" href="../../dc/dac/io_8h.html#a77b934268de1b3ecdcf3f275413b3108" title="input one byte from specified port" alt="" coords="615,5,696,32"/> <area shape="rect" href="../../dc/dac/io_8h.html#a8acc1a06073db2e7b92ffbd00fbd0cf1" title="outputut one byte to specified port" alt="" coords="611,56,700,83"/> <area shape="rect" href="../../dd/d71/tty_8h.html#a4f96ccac7e60296ef496008d8cbed0ff" title=" " alt="" coords="623,107,687,133"/> <area shape="rect" href="../../dd/d71/tty_8h.html#ad96f57a7c113d3cfa76ee5fed6de33c0" title=" " alt="" coords="621,157,690,184"/> <area shape="rect" href="../../dc/d88/armv6_2spinlock_8c.html#a71f03d2ba55111c715b6068254847a53" title=" " alt="" coords="748,157,823,184"/> <area shape="rect" href="../../d3/d02/armv6_2sched_8c.html#a08933fe6d593a1c78b9080359f15a0b7" title=" " alt="" coords="871,132,962,159"/> <area shape="rect" href="../../dc/d88/armv6_2spinlock_8c.html#a740766af5da58616f700fffab6768a78" title=" " alt="" coords="871,183,963,209"/> </map> </div> </div> </div> <a id="gac7ff314270976b80559d043f6098817b"></a> <h2 class="memtitle"><span class="permalink"><a href="#gac7ff314270976b80559d043f6098817b">◆ </a></span>sys_sem_valid()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int sys_sem_valid </td> <td>(</td> <td class="paramtype">struct <a class="el" href="../../d4/da3/structsys__sem.html">sys_sem</a> ** </td> <td class="paramname"><em>s</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Check if a semaphore is valid/allocated: return 1 for valid, 0 for invalid </p> <p class="definition">Definition at line <a class="el" href="../../d9/d56/sys__arch_8c_source.html#l00131">131</a> of file <a class="el" href="../../d9/d56/sys__arch_8c_source.html">sys_arch.c</a>.</p> <p class="reference">Referenced by <a class="el" href="../../d2/d55/tcpip_8c_source.html#l00322">tcpip_send_msg_wait_sem()</a>.</p> </div> </div> </div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.16 </li> </ul> </div> </body> </html>