Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > by-pkgid > 4f5f2dc0f55b453456458df885792b0b > files > 529

ucommon-doc-5.0.4-1mdv2010.2.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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"/>
<title>ucommon: ucommon/thread.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>ucommon/thread.h File Reference</h1>
<p>Thread classes and sychronization objects.  
<a href="#_details">More...</a></p>
<code>#include &lt;<a class="el" href="a00194_source.html">ucommon/platform.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="a00177_source.html">ucommon/access.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="a00203_source.html">ucommon/timers.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="a00190_source.html">ucommon/memory.h</a>&gt;</code><br/>
<div class="dynheader">
Include dependency graph for thread.h:</div>
<div class="dynsection">
<div class="center"><img src="a00268.png" border="0" usemap="#ucommon_2thread_8h_map" alt=""/></div>
<map name="ucommon_2thread_8h_map" id="ucommon_2thread_8h">
<area shape="rect" id="node3" href="a00194.html" title="Various miscellaneous platform specific headers and defines." alt="" coords="633,379,836,405"/><area shape="rect" id="node26" href="a00177.html" title="Locking classes for member function automatic operations." alt="" coords="437,304,619,331"/><area shape="rect" id="node29" href="a00203.html" title="Realtime timers and timer queues." alt="" coords="1079,80,1260,107"/><area shape="rect" id="node56" href="a00190.html" title="Private heaps, pools, and associations." alt="" coords="565,80,747,107"/><area shape="rect" id="node31" href="a00188.html" title="Linked objects, lists, templates, and containers." alt="" coords="693,155,875,181"/><area shape="rect" id="node34" href="a00192.html" title="A common object base class with auto&#45;pointer support." alt="" coords="945,229,1127,256"/><area shape="rect" id="node37" href="a00186.html" title="Generic templates for C++." alt="" coords="965,304,1168,331"/><area shape="rect" id="node59" href="a00195.html" title="Abstract interfaces and support." alt="" coords="629,229,840,256"/></map>
</div>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dynsection">
<div class="center"><img src="a00269.png" border="0" usemap="#ucommon_2thread_8hdep_map" alt=""/></div>
<map name="ucommon_2thread_8hdep_map" id="ucommon_2thread_8hdep">
<area shape="rect" id="node3" href="a00181.html" title="Threadsafe object containers." alt="" coords="5,229,227,256"/><area shape="rect" id="node5" href="a00204.html" title="Top level include file for the GNU uCommon C++ core library." alt="" coords="340,304,532,331"/><area shape="rect" id="node9" href="a00185.html" title="Thread&#45;aware file system manipulation class." alt="" coords="375,80,537,107"/><area shape="rect" id="node18" href="a00200.html" title="Any ucommon streaming classes that are built from std::streamio facilities and that..." alt="" coords="557,155,739,181"/><area shape="rect" id="node22" href="a00189.html" title="Support for memory mapped objects." alt="" coords="763,155,944,181"/><area shape="rect" id="node27" href="a00206.html" title="Basic array and reusable object factory heap support." alt="" coords="876,80,1057,107"/><area shape="rect" id="node7" href="a00196.html" title="This library holds basic cryptographic functions and secure socket support for use..." alt="" coords="345,379,527,405"/><area shape="rect" id="node11" href="a00180.html" title="Classes which use the buffer protocol to stream data." alt="" coords="352,155,533,181"/><area shape="rect" id="node13" href="a00197.html" title="Generic shell parsing and application services." alt="" coords="412,229,583,256"/></map>
</div>

<p><a href="a00202_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00022.html">ucommon::auto_protect</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A mutex locked object smart pointer helper class.  <a href="a00022.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00024.html">ucommon::barrier</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A portable implimentation of "barrier" thread sychronization.  <a href="a00024.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00036.html">ucommon::Conditional</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The conditional is a common base for other thread synchronizing classes.  <a href="a00036.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html">ucommon::ConditionalAccess</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The conditional rw seperates scheduling for optizming behavior or rw locks.  <a href="a00037.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html">ucommon::ConditionalLock</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An optimized and convertable shared lock.  <a href="a00038.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00045.html">ucommon::DetachedThread</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A detached thread object that is stand-alone.  <a href="a00045.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00053.html">ucommon::JoinableThread</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A child thread object that may be joined by parent.  <a href="a00053.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00069.html">ucommon::locked_instance&lt; T &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A templated smart pointer instance for lock protected objects.  <a href="a00069.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00070.html">ucommon::locked_pointer&lt; T &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Templated locked pointer for referencing locked objects of specific type.  <a href="a00070.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00071.html">ucommon::locked_release</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Auto-pointer support class for locked objects.  <a href="a00071.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00072.html">ucommon::LockedPointer</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An object pointer that uses mutex to assure thread-safe singleton use.  <a href="a00072.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00086.html">ucommon::Mutex</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generic non-recursive exclusive lock class.  <a href="a00086.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00087.html">ucommon::Mutex::gaurd</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gaurd class to apply scope based mutex locking to objects.  <a href="a00087.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00088.html">ucommon::mutex_pointer&lt; T &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typed smart locked pointer class.  <a href="a00088.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00114.html">ucommon::RecursiveMutex</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Portable recursive exclusive lock.  <a href="a00114.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00115.html">ucommon::ReusableAllocator</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Class for resource bound memory pools between threads.  <a href="a00115.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00119.html">ucommon::Semaphore</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A portable counting semaphore class.  <a href="a00119.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00122.html">ucommon::shared_instance&lt; T &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A templated smart pointer instance for shared singleton typed objects.  <a href="a00122.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00124.html">ucommon::shared_pointer&lt; T &gt;</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Templated shared pointer for singleton shared objects of specific type.  <a href="a00124.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00125.html">ucommon::shared_release</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Auto-pointer support class for shared singleton objects.  <a href="a00125.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00126.html">ucommon::SharedObject</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Shared singleton object.  <a href="a00126.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html">ucommon::SharedPointer</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The shared pointer is used to manage a singleton instance of shared object.  <a href="a00127.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00156.html">ucommon::Thread</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An abstract class for defining classes that operate as a thread.  <a href="a00156.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00157.html">ucommon::ThreadLock</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A generic and portable implimentation of Read/Write locking.  <a href="a00157.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00158.html">ucommon::ThreadLock::gaurd_reader</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gaurd class to apply scope based access locking to objects.  <a href="a00158.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00159.html">ucommon::ThreadLock::gaurd_writer</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gaurd class to apply scope based exclusive locking to objects.  <a href="a00159.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00161.html">ucommon::TimedEvent</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Event notification to manage scheduled realtime threads.  <a href="a00161.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Namespaces</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html">ucommon</a></td></tr>

<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Common namespace for all ucommon objects. </p>
<br/></td></tr>
</p>
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>ENTER_EXCLUSIVE</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8952f3c34bdc70488c3176af1041104f"></a><!-- doxytag: member="thread.h::LEAVE_EXCLUSIVE" ref="a8952f3c34bdc70488c3176af1041104f" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>LEAVE_EXCLUSIVE</b>&nbsp;&nbsp;&nbsp;pthread_mutex_unlock(&amp;__sync__);} while(0);</td></tr>
<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3c7870419a69d08ac512ca90b2ee5c30"></a><!-- doxytag: member="thread.h::accesslock_t" ref="a3c7870419a69d08ac512ca90b2ee5c30" args="" -->
typedef ConditionalAccess&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#a3c7870419a69d08ac512ca90b2ee5c30">ucommon::accesslock_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience type for scheduling access. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab4765976f498ecdf872d4984bafb681c"></a><!-- doxytag: member="thread.h::barrier_t" ref="ab4765976f498ecdf872d4984bafb681c" args="" -->
typedef barrier&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#ab4765976f498ecdf872d4984bafb681c">ucommon::barrier_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience type for using thread barriers. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abebfc4fdbd3f121384e37dec22d81a99"></a><!-- doxytag: member="thread.h::condlock_t" ref="abebfc4fdbd3f121384e37dec22d81a99" args="" -->
typedef ConditionalLock&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#abebfc4fdbd3f121384e37dec22d81a99">ucommon::condlock_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience type for using conditional locks. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2398d6ff8eba53501c5c9f9546a460bb"></a><!-- doxytag: member="thread.h::mutex_t" ref="a2398d6ff8eba53501c5c9f9546a460bb" args="" -->
typedef Mutex&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#a2398d6ff8eba53501c5c9f9546a460bb">ucommon::mutex_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience type for using exclusive mutex locks. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afec4835fd37bc545b7d94b1c6e418846"></a><!-- doxytag: member="thread.h::rexlock_t" ref="afec4835fd37bc545b7d94b1c6e418846" args="" -->
typedef RecursiveMutex&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#afec4835fd37bc545b7d94b1c6e418846">ucommon::rexlock_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience type for using recursive exclusive locks. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7e3cf59c308d4010952a23e8a98e7053"></a><!-- doxytag: member="thread.h::rwlock_t" ref="a7e3cf59c308d4010952a23e8a98e7053" args="" -->
typedef ThreadLock&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#a7e3cf59c308d4010952a23e8a98e7053">ucommon::rwlock_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience type for using read/write locks. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3ee7dd630e73f3ed67f1832535ccb6c4"></a><!-- doxytag: member="thread.h::semaphore_t" ref="a3ee7dd630e73f3ed67f1832535ccb6c4" args="" -->
typedef Semaphore&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#a3ee7dd630e73f3ed67f1832535ccb6c4">ucommon::semaphore_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience type for using counting semaphores. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae8d4cd555819dc808ebaba1399fc1ef4"></a><!-- doxytag: member="thread.h::timedevent_t" ref="ae8d4cd555819dc808ebaba1399fc1ef4" args="" -->
typedef TimedEvent&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#ae8d4cd555819dc808ebaba1399fc1ef4">ucommon::timedevent_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience type for using timed events. <br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#ae40e9a29f3fd228b50f046f7d428eb6a">ucommon::access</a> (condlock_t &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function for shared access to a conditional lock.  <a href="#ae40e9a29f3fd228b50f046f7d428eb6a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#ae8014d7a484399e83e7a3f66a0d34a66">ucommon::access</a> (accesslock_t &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to shared read schedule conditional access.  <a href="#ae8014d7a484399e83e7a3f66a0d34a66"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#a3c813dcccc3a9eec6a0da47efcac7a1f">ucommon::acquire</a> (mutex_t &amp;mutex)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to acquire a mutex.  <a href="#a3c813dcccc3a9eec6a0da47efcac7a1f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#ac9f6f0089b3169e2d79bbf0c7777e6e5">ucommon::commit</a> (condlock_t &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to commit and release an exclusively locked conditional lock.  <a href="#ac9f6f0089b3169e2d79bbf0c7777e6e5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#af77af9c36e881ef569e2fb1bf5dca1d6">ucommon::commit</a> (accesslock_t &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to commit an exclusive access lock.  <a href="#af77af9c36e881ef569e2fb1bf5dca1d6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#a7b0d2beefd1454719db2b26aebdf3f61">ucommon::exclusive</a> (rwlock_t &amp;lock, <a class="el" href="a00194.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=Timer::inf)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function for exclusive write access to a read/write lock.  <a href="#a7b0d2beefd1454719db2b26aebdf3f61"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#a54b291a8e54c576e4e67c6fd04733089">ucommon::exclusive</a> (condlock_t &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to exclusively lock shared conditional lock.  <a href="#a54b291a8e54c576e4e67c6fd04733089"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#a193c654e8874e1039646f9f981c4785e">ucommon::lock</a> (rexlock_t &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to lock a shared recursive mutex lock.  <a href="#a193c654e8874e1039646f9f981c4785e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#ae7473d2a2c893387d5f6046486c46b5a">ucommon::modify</a> (condlock_t &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to exclusively aquire a conditional lock.  <a href="#ae7473d2a2c893387d5f6046486c46b5a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#a7bbf6bb584edfaa7d0cf79c1312ea26f">ucommon::modify</a> (accesslock_t &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to exclusively schedule conditional access.  <a href="#a7bbf6bb584edfaa7d0cf79c1312ea26f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#ae9c42524f9bed49eb0da7a443c36d1aa">ucommon::release</a> (rexlock_t &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to release a shared recursive mutex lock.  <a href="#ae9c42524f9bed49eb0da7a443c36d1aa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#af250e8f47c069f733f78cf73855e45e6">ucommon::release</a> (rwlock_t &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to release a shared lock.  <a href="#af250e8f47c069f733f78cf73855e45e6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#a171f36a021804ce628a3da7f2c19c7b6">ucommon::release</a> (condlock_t &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to release shared access to a conditional lock.  <a href="#a171f36a021804ce628a3da7f2c19c7b6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#a1e5c8030c3c086e9fa9d4116092da607">ucommon::release</a> (accesslock_t &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to release an access lock.  <a href="#a1e5c8030c3c086e9fa9d4116092da607"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#adad46d50a99361486daa6c298d1a2d21">ucommon::release</a> (mutex_t &amp;mutex)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to release a mutex.  <a href="#adad46d50a99361486daa6c298d1a2d21"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#ab40408ee1a0ecade11a865036007ed80">ucommon::release</a> (semaphore_t &amp;semaphore)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to release a semaphore.  <a href="#ab40408ee1a0ecade11a865036007ed80"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#ae8121584dc72d5d51403c61aa4d3873f">ucommon::share</a> (rwlock_t &amp;lock, <a class="el" href="a00194.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=Timer::inf)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function for shared read access to a read/write lock.  <a href="#ae8121584dc72d5d51403c61aa4d3873f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#a2a6157c301532362884a18c25c098c52">ucommon::share</a> (condlock_t &amp;lock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to restore shared access on a conditional lock.  <a href="#a2a6157c301532362884a18c25c098c52"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#ad9c387d81bbd692673cb269301fa0977">ucommon::start</a> (DetachedThread *thread, int priority=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to start a detached thread.  <a href="#ad9c387d81bbd692673cb269301fa0977"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#a3c62610106837fc4ebbe70e9001bdb2f">ucommon::start</a> (JoinableThread *thread, int priority=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to start a joinable thread.  <a href="#a3c62610106837fc4ebbe70e9001bdb2f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#a333b7825bb02a3a0429e8c2153b130b2">ucommon::wait</a> (semaphore_t &amp;semaphore, <a class="el" href="a00194.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=Timer::inf)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to wait on a semaphore.  <a href="#a333b7825bb02a3a0429e8c2153b130b2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00208.html#a5c50c87fd1eb5b1ac93dffa0ee6f9af5">ucommon::wait</a> (barrier_t &amp;barrier)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to wait on a barrier.  <a href="#a5c50c87fd1eb5b1ac93dffa0ee6f9af5"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Thread classes and sychronization objects. </p>
<p>The theory behind ucommon thread classes is that they would be used to create derived classes where thread-specific data can be stored as member data of the derived class. The run method is called when the context is executed. Since we use a pthread foundation, we support both detached threads and joinable threads. Objects based on detached threads should be created with new, and will automatically delete when the thread context exits. Joinable threads will be joined with deleted.</p>
<p>The theory behind ucommon sychronization objects is that all upper level sychronization objects can be formed directly from a mutex and conditional. This includes semaphores, barriers, rwlock, our own specialized conditional lock, resource-bound locking, and recurive exclusive locks. Using only conditionals means we are not dependent on platform specific pthread implimentations that may not impliment some of these, and hence improves portability and consistency. Given that our rwlocks are recursive access locks, one can safely create read/write threading pairs where the read threads need not worry about deadlocks and the writers need not either if they only write-lock one instance at a time to change state. </p>

<p>Definition in file <a class="el" href="a00202_source.html">thread.h</a>.</p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ab3af63951c15aa174c0a64da351d7a0c"></a><!-- doxytag: member="thread.h::ENTER_EXCLUSIVE" ref="ab3af63951c15aa174c0a64da351d7a0c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ENTER_EXCLUSIVE</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> { <span class="keyword">static</span> pthread_mutex_t __sync__ = PTHREAD_MUTEX_INITIALIZER; \
        pthread_mutex_lock(&amp;__sync__);
</pre></div>
<p>Definition at line <a class="el" href="a00202_source.html#l02248">2248</a> of file <a class="el" href="a00202_source.html">thread.h</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Jul 14 16:39:15 2011 for ucommon by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>