<!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/include/ubixos/spinlock.h 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_caf4200c438ae9601464168e21e8e4d8.html">include</a> » <a class="el" href="dir_9854bc9d2b9a2a73f32c73e97d31d0f7.html">ubixos</a></div> <h1>spinlock.h File Reference</h1><code>#include <<a class="el" href="types_8h-source.html">ubixos/types.h</a>></code><br> <p> Include dependency graph for spinlock.h:<p><center><img src="spinlock_8h__incl.png" border="0" usemap="#src/sys/include/ubixos/spinlock.h_map" alt=""></center> <map name="src/sys/include/ubixos/spinlock.h_map"> <area href="types_8h.html" shape="rect" coords="298,5,418,32" alt=""> <area href="__types_8h.html" shape="rect" coords="468,5,572,32" alt=""> </map> <p> This graph shows which files directly or indirectly include this file:<p><center><img src="spinlock_8h__dep__incl.png" border="0" usemap="#src/sys/include/ubixos/spinlock.hdep_map" alt=""></center> <map name="src/sys/include/ubixos/spinlock.hdep_map"> <area href="devfs_8c.html" shape="rect" coords="340,5,503,32" alt=""> <area href="atkbd_8c.html" shape="rect" coords="348,56,495,83" alt=""> <area href="fdc_8c.html" shape="rect" coords="357,107,485,133" alt=""> <area href="ne2k_8c.html" shape="rect" coords="351,157,492,184" alt=""> <area href="sched_8c.html" shape="rect" coords="336,208,507,235" alt=""> <area href="smp_8c.html" shape="rect" coords="343,259,500,285" alt=""> <area href="spinlock_8c.html" shape="rect" coords="329,309,513,336" alt=""> <area href="syscall__new_8c.html" shape="rect" coords="317,360,525,387" alt=""> <area href="tty_8c.html" shape="rect" coords="348,411,495,437" alt=""> <area href="ubthread_8c.html" shape="rect" coords="325,461,517,488" alt=""> <area href="kmod_8c.html" shape="rect" coords="336,512,507,539" alt=""> <area href="kmalloc_8c.html" shape="rect" coords="343,563,500,589" alt=""> <area href="system_8c.html" shape="rect" coords="340,613,503,640" alt=""> <area href="device_8c.html" shape="rect" coords="344,664,499,691" alt=""> <area href="video_8c.html" shape="rect" coords="348,715,495,741" alt=""> <area href="dirCache_8c.html" shape="rect" coords="327,765,516,792" alt=""> <area href="file_8c.html" shape="rect" coords="357,816,485,843" alt=""> <area href="copyvirtualspace_8c.html" shape="rect" coords="303,867,540,893" alt=""> <area href="getfreepage_8c.html" shape="rect" coords="319,917,524,944" alt=""> <area href="getfreevirtualpage_8c.html" shape="rect" coords="297,968,545,995" alt=""> <area href="pagefault_8c.html" shape="rect" coords="328,1019,515,1045" alt=""> <area href="paging_8c.html" shape="rect" coords="337,1069,505,1096" alt=""> <area href="vmm__memory_8c.html" shape="rect" coords="312,1120,531,1147" alt=""> </map> <p> <a href="spinlock_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>Defines</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="spinlock_8h.html#0fe85a4f3642683148b25916d6c5eafd">SPIN_LOCK_INITIALIZER</a> 0</td></tr> <tr><td colspan="2"><br><h2>Typedefs</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef volatile int </td><td class="memItemRight" valign="bottom"><a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a></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_8h.html#2cd9a4502680fb8e7f0fe6b029e558b1">spinLock</a> (<a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> *)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="spinlock_8h.html#4a5b56fc59f6a63a4d6cfac573889789">spinLock_scheduler</a> (<a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> *)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="spinlock_8h.html#7092f143f66f5cab13a9d49ed42ab4d3">spinLockInit</a> (<a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> *)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="spinlock_8h.html#cba75fe5ed894dc88030f7458b114a94">spinLockLocked</a> (<a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> *)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="spinlock_8h.html#8f9173fadeddafa01754d6cbcc630198">spinTryLock</a> (<a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> *)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="spinlock_8h.html#dd996cbbb3b9826dd9c8cf02b66a4c65">spinUnlock</a> (<a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</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="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="spinlock_8h.html#061103633079320d29a623d5758623b1">Master</a></td></tr> </table> <hr><h2>Define Documentation</h2> <a class="anchor" name="0fe85a4f3642683148b25916d6c5eafd"></a><!-- doxytag: member="spinlock.h::SPIN_LOCK_INITIALIZER" ref="0fe85a4f3642683148b25916d6c5eafd" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define SPIN_LOCK_INITIALIZER 0 </td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="spinlock_8h-source.html#l00035">35</a> of file <a class="el" href="spinlock_8h-source.html">spinlock.h</a>. <p> Referenced by <a class="el" href="spinlock_8c-source.html#l00033">spinLockInit()</a>. </div> </div><p> <hr><h2>Typedef Documentation</h2> <a class="anchor" name="a240e9404b4ede1e0d714610080d1176"></a><!-- doxytag: member="spinlock.h::spinLock_t" ref="a240e9404b4ede1e0d714610080d1176" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef volatile int <a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> </td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="spinlock_8h-source.html#l00037">37</a> of file <a class="el" href="spinlock_8h-source.html">spinlock.h</a>. </div> </div><p> <hr><h2>Function Documentation</h2> <a class="anchor" name="2cd9a4502680fb8e7f0fe6b029e558b1"></a><!-- doxytag: member="spinlock.h::spinLock" ref="2cd9a4502680fb8e7f0fe6b029e558b1" args="(spinLock_t *)" --> <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"> </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_8h_2cd9a4502680fb8e7f0fe6b029e558b1_cgraph.png" border="0" usemap="#spinlock_8h_2cd9a4502680fb8e7f0fe6b029e558b1_cgraph_map" alt=""></center> <map name="spinlock_8h_2cd9a4502680fb8e7f0fe6b029e558b1_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="4a5b56fc59f6a63a4d6cfac573889789"></a><!-- doxytag: member="spinlock.h::spinLock_scheduler" ref="4a5b56fc59f6a63a4d6cfac573889789" args="(spinLock_t *)" --> <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"> </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_8h_4a5b56fc59f6a63a4d6cfac573889789_cgraph.png" border="0" usemap="#spinlock_8h_4a5b56fc59f6a63a4d6cfac573889789_cgraph_map" alt=""></center> <map name="spinlock_8h_4a5b56fc59f6a63a4d6cfac573889789_cgraph_map"> <area href="spinlock_8h.html#8f9173fadeddafa01754d6cbcc630198" shape="rect" coords="210,5,308,32" alt=""> </map> </div> </div><p> <a class="anchor" name="7092f143f66f5cab13a9d49ed42ab4d3"></a><!-- doxytag: member="spinlock.h::spinLockInit" ref="7092f143f66f5cab13a9d49ed42ab4d3" args="(spinLock_t *)" --> <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"> </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="cba75fe5ed894dc88030f7458b114a94"></a><!-- doxytag: member="spinlock.h::spinLockLocked" ref="cba75fe5ed894dc88030f7458b114a94" args="(spinLock_t *)" --> <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"> </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="8f9173fadeddafa01754d6cbcc630198"></a><!-- doxytag: member="spinlock.h::spinTryLock" ref="8f9173fadeddafa01754d6cbcc630198" args="(spinLock_t *)" --> <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"> </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="dd996cbbb3b9826dd9c8cf02b66a4c65"></a><!-- doxytag: member="spinlock.h::spinUnlock" ref="dd996cbbb3b9826dd9c8cf02b66a4c65" args="(spinLock_t *)" --> <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"> </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><h2>Variable Documentation</h2> <a class="anchor" name="061103633079320d29a623d5758623b1"></a><!-- doxytag: member="spinlock.h::Master" ref="061103633079320d29a623d5758623b1" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="spinlock_8h.html#a240e9404b4ede1e0d714610080d1176">spinLock_t</a> <a class="el" href="syscall__new_8c.html#061103633079320d29a623d5758623b1">Master</a> </td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="syscall__new_8c-source.html#l00039">39</a> of file <a class="el" href="syscall__new_8c-source.html">syscall_new.c</a>. </div> </div><p> <hr size="1"><address style="align: right;"><small>Generated on Fri Dec 15 11:21:41 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>