classmutex.html
来自「美国COPLEY驱动器,程序开发工具之一.」· HTML 代码 · 共 108 行
HTML
108 行
<!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>Copley Motion Library: Mutex Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.4 --><div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div><h1>Mutex Class Reference</h1><!-- doxytag: class="Mutex" --><a href="classMutex-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>This class represents an object that can be used by multiple threads to gain safe access to a shared resource. <p>If an attempt is made to lock a mutex that is currently locked by another thread, the thread attempting the lock will be suspended until the thread holding the lock releases it. Mutex objects are not required to allow recursive access.<p><p>Definition at line <a class="el" href="CML__Threads_8h-source.html#l00137">137</a> of file <a class="el" href="CML__Threads_8h-source.html">CML_Threads.h</a>.<table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0"></a><!-- doxytag: member="Mutex::Mutex" ref="a0" args="(void)" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMutex.html#a0">Mutex</a> (void)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new mutex object. <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1"></a><!-- doxytag: member="Mutex::~Mutex" ref="a1" args="()" -->virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classMutex.html#a1">~Mutex</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Free any system resources associated with the mutex. <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classError.html">Error</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classMutex.html#a2">Lock</a> (void)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Lock the mutex. <a href="#a2"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classError.html">Error</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classMutex.html#a3">Unlock</a> (void)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Unlock the mutex. <a href="#a3"></a><br></td></tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="a2"></a><!-- doxytag: member="Mutex::Lock" ref="a2" args="(void)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">const <a class="el" href="classError.html">Error</a>* Lock </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Lock the mutex. <p>This function causes the calling function to gain exclusive access to the mutex object. If some other thread has the mutex locked when this method is called, the calling thread will block until the mutex is unlocked. <dl compact><dt><b>Returns:</b></dt><dd>An error object. </dd></dl> </td> </tr></table><a class="anchor" name="a3"></a><!-- doxytag: member="Mutex::Unlock" ref="a3" args="(void)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">const <a class="el" href="classError.html">Error</a>* Unlock </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Unlock the mutex. <p>This function causes the calling thread to give up it's lock on the mutex. A task switch may occur before this call returns if a high priority task is currently trying to lock the mutex. <dl compact><dt><b>Returns:</b></dt><dd>An error object. </dd></dl> </td> </tr></table><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="CML__Threads_8h-source.html">CML_Threads.h</a></ul><hr><address style="align: right;"><small>Copley Motion Library, Copyright (c) 2002-2003<a href="http://www.copleycontrols.com"><img src="CCC_logo.gif" alt="Copley Controls Corp." align="middle" border=0 ></a></small></address></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?