<!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/spinlock.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>spinlock.c File Reference</h1><code>#include <<a class="el" href="spinlock_8h-source.html">ubixos/spinlock.h</a>></code><br> <code>#include <<a class="el" href="sched_8h-source.html">ubixos/sched.h</a>></code><br> <p> Include dependency graph for spinlock.c:<p><center><img src="spinlock_8c__incl.png" border="0" usemap="#src/sys/kernel/spinlock.c_map" alt=""></center> <map name="src/sys/kernel/spinlock.c_map"> <area href="spinlock_8h.html" shape="rect" coords="240,31,379,58" alt=""> <area href="sched_8h.html" shape="rect" coords="248,132,371,159" alt=""> <area href="types_8h.html" shape="rect" coords="583,132,703,159" alt=""> <area href="tty_8h.html" shape="rect" coords="431,107,529,134" alt=""> <area href="file_8h.html" shape="rect" coords="440,158,520,184" alt=""> <area href="tss_8h.html" shape="rect" coords="440,208,520,235" alt=""> <area href="thread_8h.html" shape="rect" coords="428,259,532,286" alt=""> </map> <p> <a href="spinlock_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">void </td><td class="memItemRight" valign="bottom"><a class="el" href="spinlock_8c.html#71f03d2ba55111c715b6068254847a53">spinLock</a> (<a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> *lock)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="spinlock_8c.html#c208390343fe1dffbe7a192df35c329e">spinLock_scheduler</a> (<a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> *lock)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="spinlock_8c.html#2d24a3613a1841bfa55a7b235fb5d78f">spinLockInit</a> (<a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> *lock)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="spinlock_8c.html#6c0fe254de396873793ccc16915a6631">spinLockLocked</a> (<a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> *lock)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="spinlock_8c.html#740766af5da58616f700fffab6768a78">spinTryLock</a> (<a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> *lock)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="spinlock_8c.html#e29ab191c93f9ead066cb462dd2e7247">spinUnlock</a> (<a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> *lock)</td></tr> </table> <hr><h2>Function Documentation</h2> <a class="anchor" name="71f03d2ba55111c715b6068254847a53"></a><!-- doxytag: member="spinlock.c::spinLock" ref="71f03d2ba55111c715b6068254847a53" args="(spinLock_t *lock)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void spinLock </td> <td>(</td> <td class="paramtype"><a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> * </td> <td class="paramname"> <em>lock</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="spinlock_8c-source.html#l00056">56</a> of file <a class="el" href="spinlock_8c-source.html">spinlock.c</a>. <p> References <a class="el" href="sched_8c-source.html#l00259">sched_yield()</a>, and <a class="el" href="spinlock_8c-source.html#l00048">spinTryLock()</a>. <p> Referenced by <a class="el" href="vmm__memory_8c-source.html#l00266">adjustCowCounter()</a>, <a class="el" href="smp_8c-source.html#l00182">cpuInfo()</a>, <a class="el" href="devfs_8c-source.html#l00178">devfs_makeNode()</a>, <a class="el" href="devfs_8c-source.html#l00071">devfs_open()</a>, <a class="el" href="device_8c-source.html#l00051">device_add()</a>, <a class="el" href="device_8c-source.html#l00086">device_find()</a>, <a class="el" href="device_8c-source.html#l00110">device_remove()</a>, <a class="el" href="file_8c-source.html#l00398">fclose()</a>, <a class="el" href="fdc_8c-source.html#l00303">fdcRead()</a>, <a class="el" href="file_8c-source.html#l00274">fopen()</a>, <a class="el" href="vmm__memory_8c-source.html#l00228">freePage()</a>, <a class="el" href="kmalloc_8c-source.html#l00067">getEmptyDesc()</a>, <a class="el" href="smp_8c-source.html#l00123">kernel_function()</a>, <a class="el" href="kmalloc_8c-source.html#l00351">kfree()</a>, <a class="el" href="kmalloc_8c-source.html#l00247">kmalloc()</a>, <a class="el" href="system_8c-source.html#l00069">mpi_createMbox()</a>, <a class="el" href="system_8c-source.html#l00234">mpi_destroyMbox()</a>, <a class="el" href="system_8c-source.html#l00189">mpi_fetchMessage()</a>, <a class="el" href="system_8c-source.html#l00143">mpi_postMessage()</a>, <a class="el" href="system_8c-source.html#l00108">mpi_spam()</a>, <a class="el" href="ne2k_8c-source.html#l00313">ne2kAllocBuffer()</a>, <a class="el" href="sched_8c-source.html#l00143">schedNewTask()</a>, <a class="el" href="smp_8c-source.html#l00161">smpInit()</a>, <a class="el" href="tty_8c-source.html#l00118">tty_print()</a>, <a class="el" href="dirCache_8c-source.html#l00242">ubixfs_cacheAdd()</a>, <a class="el" href="dirCache_8c-source.html#l00055">ubixfs_cacheFind()</a>, <a class="el" href="paging_8c-source.html#l00401">vmm_getFreeMallocPage()</a>, <a class="el" href="pagefault_8c-source.html#l00053">vmm_pageFault()</a>, <a class="el" href="paging_8c-source.html#l00160">vmm_remapPage()</a>, <a class="el" href="copyvirtualspace_8c-source.html#l00053">vmmCopyVirtualSpace()</a>, <a class="el" href="vmm__memory_8c-source.html#l00186">vmmFindFreePage()</a>, <a class="el" href="vmm__memory_8c-source.html#l00296">vmmFreeProcessPages()</a>, <a class="el" href="paging_8c-source.html#l00253">vmmGetFreeKernelPage()</a>, <a class="el" href="getfreepage_8c-source.html#l00048">vmmGetFreePage()</a>, and <a class="el" href="getfreevirtualpage_8c-source.html#l00047">vmmGetFreeVirtualPage()</a>. <p> Here is the call graph for this function:<p><center><img src="spinlock_8c_71f03d2ba55111c715b6068254847a53_cgraph.png" border="0" usemap="#spinlock_8c_71f03d2ba55111c715b6068254847a53_cgraph_map" alt=""></center> <map name="spinlock_8c_71f03d2ba55111c715b6068254847a53_cgraph_map"> <area href="sched_8h.html#08933fe6d593a1c78b9080359f15a0b7" shape="rect" coords="136,56,237,83" alt=""> <area href="spinlock_8h.html#8f9173fadeddafa01754d6cbcc630198" shape="rect" coords="421,107,520,134" alt=""> <area href="sched_8h.html#549a0c1cc47933fa045b200690965cbd" shape="rect" coords="287,56,348,83" alt=""> <area href="sched_8h.html#e969273d772018d111e1f0344eb550f8" shape="rect" coords="397,6,544,32" alt=""> <area href="sched_8h.html#086cc0adc0b6a3860ceeeb5bc5ea94ea" shape="rect" coords="401,56,540,83" alt=""> </map> </div> </div><p> <a class="anchor" name="c208390343fe1dffbe7a192df35c329e"></a><!-- doxytag: member="spinlock.c::spinLock_scheduler" ref="c208390343fe1dffbe7a192df35c329e" args="(spinLock_t *lock)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void spinLock_scheduler </td> <td>(</td> <td class="paramtype"><a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> * </td> <td class="paramname"> <em>lock</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="spinlock_8c-source.html#l00064">64</a> of file <a class="el" href="spinlock_8c-source.html">spinlock.c</a>. <p> References <a class="el" href="spinlock_8c-source.html#l00048">spinTryLock()</a>. <p> Here is the call graph for this function:<p><center><img src="spinlock_8c_c208390343fe1dffbe7a192df35c329e_cgraph.png" border="0" usemap="#spinlock_8c_c208390343fe1dffbe7a192df35c329e_cgraph_map" alt=""></center> <map name="spinlock_8c_c208390343fe1dffbe7a192df35c329e_cgraph_map"> <area href="spinlock_8h.html#8f9173fadeddafa01754d6cbcc630198" shape="rect" coords="210,5,308,32" alt=""> </map> </div> </div><p> <a class="anchor" name="2d24a3613a1841bfa55a7b235fb5d78f"></a><!-- doxytag: member="spinlock.c::spinLockInit" ref="2d24a3613a1841bfa55a7b235fb5d78f" args="(spinLock_t *lock)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void spinLockInit </td> <td>(</td> <td class="paramtype"><a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> * </td> <td class="paramname"> <em>lock</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="spinlock_8c-source.html#l00033">33</a> of file <a class="el" href="spinlock_8c-source.html">spinlock.c</a>. <p> References <a class="el" href="spinlock_8h-source.html#l00035">SPIN_LOCK_INITIALIZER</a>. </div> </div><p> <a class="anchor" name="6c0fe254de396873793ccc16915a6631"></a><!-- doxytag: member="spinlock.c::spinLockLocked" ref="6c0fe254de396873793ccc16915a6631" args="(spinLock_t *lock)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int spinLockLocked </td> <td>(</td> <td class="paramtype"><a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> * </td> <td class="paramname"> <em>lock</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="spinlock_8c-source.html#l00070">70</a> of file <a class="el" href="spinlock_8c-source.html">spinlock.c</a>. <p> Referenced by <a class="el" href="smp_8c-source.html#l00137">c_ap_boot()</a>. </div> </div><p> <a class="anchor" name="740766af5da58616f700fffab6768a78"></a><!-- doxytag: member="spinlock.c::spinTryLock" ref="740766af5da58616f700fffab6768a78" args="(spinLock_t *lock)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int spinTryLock </td> <td>(</td> <td class="paramtype"><a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> * </td> <td class="paramname"> <em>lock</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="spinlock_8c-source.html#l00048">48</a> of file <a class="el" href="spinlock_8c-source.html">spinlock.c</a>. <p> Referenced by <a class="el" href="atkbd_8c-source.html#l00216">keyboardHandler()</a>, <a class="el" href="sched_8c-source.html#l00084">sched()</a>, <a class="el" href="spinlock_8c-source.html#l00056">spinLock()</a>, and <a class="el" href="spinlock_8c-source.html#l00064">spinLock_scheduler()</a>. </div> </div><p> <a class="anchor" name="e29ab191c93f9ead066cb462dd2e7247"></a><!-- doxytag: member="spinlock.c::spinUnlock" ref="e29ab191c93f9ead066cb462dd2e7247" args="(spinLock_t *lock)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void spinUnlock </td> <td>(</td> <td class="paramtype"><a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> * </td> <td class="paramname"> <em>lock</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="spinlock_8c-source.html#l00037">37</a> of file <a class="el" href="spinlock_8c-source.html">spinlock.c</a>. <p> Referenced by <a class="el" href="vmm__memory_8c-source.html#l00266">adjustCowCounter()</a>, <a class="el" href="smp_8c-source.html#l00182">cpuInfo()</a>, <a class="el" href="devfs_8c-source.html#l00178">devfs_makeNode()</a>, <a class="el" href="devfs_8c-source.html#l00071">devfs_open()</a>, <a class="el" href="device_8c-source.html#l00051">device_add()</a>, <a class="el" href="device_8c-source.html#l00086">device_find()</a>, <a class="el" href="device_8c-source.html#l00110">device_remove()</a>, <a class="el" href="file_8c-source.html#l00398">fclose()</a>, <a class="el" href="fdc_8c-source.html#l00303">fdcRead()</a>, <a class="el" href="file_8c-source.html#l00274">fopen()</a>, <a class="el" href="vmm__memory_8c-source.html#l00228">freePage()</a>, <a class="el" href="kmalloc_8c-source.html#l00067">getEmptyDesc()</a>, <a class="el" href="smp_8c-source.html#l00123">kernel_function()</a>, <a class="el" href="atkbd_8c-source.html#l00216">keyboardHandler()</a>, <a class="el" href="kmalloc_8c-source.html#l00351">kfree()</a>, <a class="el" href="kmalloc_8c-source.html#l00247">kmalloc()</a>, <a class="el" href="system_8c-source.html#l00069">mpi_createMbox()</a>, <a class="el" href="system_8c-source.html#l00234">mpi_destroyMbox()</a>, <a class="el" href="system_8c-source.html#l00189">mpi_fetchMessage()</a>, <a class="el" href="system_8c-source.html#l00143">mpi_postMessage()</a>, <a class="el" href="system_8c-source.html#l00108">mpi_spam()</a>, <a class="el" href="ne2k_8c-source.html#l00313">ne2kAllocBuffer()</a>, <a class="el" href="sched_8c-source.html#l00143">schedNewTask()</a>, <a class="el" href="smp_8c-source.html#l00161">smpInit()</a>, <a class="el" href="tty_8c-source.html#l00118">tty_print()</a>, <a class="el" href="dirCache_8c-source.html#l00242">ubixfs_cacheAdd()</a>, <a class="el" href="dirCache_8c-source.html#l00055">ubixfs_cacheFind()</a>, <a class="el" href="paging_8c-source.html#l00401">vmm_getFreeMallocPage()</a>, <a class="el" href="pagefault_8c-source.html#l00053">vmm_pageFault()</a>, <a class="el" href="paging_8c-source.html#l00160">vmm_remapPage()</a>, <a class="el" href="copyvirtualspace_8c-source.html#l00053">vmmCopyVirtualSpace()</a>, <a class="el" href="vmm__memory_8c-source.html#l00186">vmmFindFreePage()</a>, <a class="el" href="vmm__memory_8c-source.html#l00296">vmmFreeProcessPages()</a>, <a class="el" href="paging_8c-source.html#l00253">vmmGetFreeKernelPage()</a>, <a class="el" href="getfreepage_8c-source.html#l00048">vmmGetFreePage()</a>, and <a class="el" href="getfreevirtualpage_8c-source.html#l00047">vmmGetFreeVirtualPage()</a>. </div> </div><p> <hr size="1"><address style="align: right;"><small>Generated on Fri Dec 15 11:24:06 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>