📄 classpcondmutex.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>PCondMutex class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>PCondMutex Class Reference</h1><code>#include <<a class="el" href="syncthrd_8h-source.html">syncthrd.h</a>></code><p><p>Inheritance diagram for PCondMutex:<p><center><img src="classPCondMutex.png" usemap="#PCondMutex_map" border="0" alt=""></center><map name="PCondMutex_map"><area href="classPMutex.html" alt="PMutex" shape="rect" coords="0,112,97,136"><area href="classPSemaphore.html" alt="PSemaphore" shape="rect" coords="0,56,97,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="0,0,97,24"><area href="classPIntCondMutex.html" alt="PIntCondMutex" shape="rect" coords="0,224,97,248"></map><a href="classPCondMutex-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classPCondMutex.html#a0">WaitCondition</a> ()</td></tr><tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classPCondMutex.html#a1">Signal</a> ()</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPCondMutex.html#a2">Condition</a> ()=0</td></tr><tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classPCondMutex.html#a3">OnWait</a> ()</td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPSyncPoint.html">PSyncPoint</a> </td><td valign=bottom><a class="el" href="classPCondMutex.html#n0">syncPoint</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class defines a thread synchonisation object.<p>This is a special type of mutual exclusion, where a thread wishes to get exlusive use of a resource but only if a certain other condition is met. <p><hr><h2>Member Function Documentation</h2><a name="a2" doxytag="PCondMutex::Condition"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual BOOL PCondMutex::Condition </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [pure virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This is the condition that must be met for the <a class="el" href="classPCondMutex.html#a0">WaitCondition()</a> function to acquire the mutex. <p>Implemented in <a class="el" href="classPIntCondMutex.html#z417_0">PIntCondMutex</a>. </td> </tr></table><a name="a3" doxytag="PCondMutex::OnWait"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void PCondMutex::OnWait </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This function is called immediately before blocking on the condition in the <a class="el" href="classPCondMutex.html#a0">WaitCondition()</a> function. This could get called multiple times before the condition is met and the <a class="el" href="classPCondMutex.html#a0">WaitCondition()</a> function returns. </td> </tr></table><a name="a1" doxytag="PCondMutex::Signal"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void PCondMutex::Signal </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>If there are waiting (blocked) threads then unblock the first one that was blocked. If no waiting threads and the count is less than the maximum then increment the semaphore. <p>Reimplemented from <a class="el" href="classPSemaphore.html#z347_2">PSemaphore</a>. </td> </tr></table><a name="a0" doxytag="PCondMutex::WaitCondition"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void PCondMutex::WaitCondition </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This function attempts to acquire the mutex, but will block not only until the mutex is free, but also that the condition returned by the <a class="el" href="classPCondMutex.html#a2">Condition()</a> function is also met. </td> </tr></table><hr><h2>Member Data Documentation</h2><a name="n0" doxytag="PCondMutex::syncPoint"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classPSyncPoint.html">PSyncPoint</a> PCondMutex::syncPoint<code> [protected]</code> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="syncthrd_8h-source.html">syncthrd.h</a></ul><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:15 2004 for PWLib by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -