Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > f48941b2df41f17d4c9519d16b753438 > files > 397

ClanLib06-devel-0.6.5-16.fc13.x86_64.rpm


<html>
<head><title>ClanLib Reference: CL_Mutex</title></head>
<body text=black link=blue vlink=#800080 bgcolor=white topmargin=0 leftmargin=0>
<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td><img border=0 src="../images/eyeheader-main-purple-a.gif" alt="ClanSoft logo" width=525 height=96></td></tr>
<tr bgcolor=#dadada><td align=left valign=top><img border=0 src="../images/eyeheader-main-purple-b.gif" alt="ClanSoft logo" width=190 height=14></td><td align=right valign=top><img border=0 src="../images/clanlib_light.gif" width=42 height=14></td></tr></table>
<table align=center border=0 cellspacing=10> <tr>
<td><a href="entire_class_index.html">Entire Class Index</a></td>
<td><a href="class_index.html">Main Class Index</a></td>
<td><a href="cross_index.html">Cross Index</a></td>
<td><a href="global_index.html">Global Index</a></td>
</table><h1 align=center>Class CL_Mutex</h1><p>
<b>  Mutex interface.</b><br>
Contained in: <a href="global_index.html">global</a><br>
Derived from:
<i>none</i>
<br>
Derived by:
<i>none</i>
<br>Group: Core (System)
<p>
#include &lt;ClanLib/core.h&gt;
<p>
<hr noshade>
<table border=0>
<tr><td colspan=3><h3>public function member index:</h3></td>
<tr valign=top><td align=left><h3>Construction:</h3></td>
<tr valign=top><td align=right><tt><tt>static</tt> <a href="CL_Mutex.html#603"><tt><font color=blue><b>CL_Mutex</b></font></tt></a>*</tt> </td><td align=right><a href="CL_Mutex.html#595"><tt><font color=blue><b>create</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt></tt> </td><td align=right><a href="CL_Mutex.html#596"><tt><font color=blue><b>CL_Mutex</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt></tt> </td><td align=right><a href="CL_Mutex.html#597"><tt><font color=blue><b>~CL_Mutex</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=left><h3>Operations:</h3></td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_Mutex.html#598"><tt><font color=blue><b>enter</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_Mutex.html#599"><tt><font color=blue><b>leave</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_Mutex.html#600"><tt><font color=blue><b>wait</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_Mutex.html#601"><tt><font color=blue><b>notify</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_Mutex.html#602"><tt><font color=blue><b>notify_all</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr><td>&nbsp;</td><tr><td colspan=3><h3>private function member index:</h3></td>
<tr valign=top><td align=right><tt></tt> </td><td align=right><a href="CL_Mutex.html#603"><tt><font color=blue><b>CL_Mutex</b></font></tt></a></td><td><tt>(<tt>const</tt> <a href="CL_Mutex.html#603"><tt><font color=blue><b>CL_Mutex</b></font></tt></a>& <tt><font color=blue>copy</font></tt>)</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_Mutex.html#604"><tt><font color=black><b>operator</b></font></tt><tt> =</tt></a></td><td><tt>(<tt>const</tt> <a href="CL_Mutex.html#603"><tt><font color=blue><b>CL_Mutex</b></font></tt></a>& <tt><font color=blue>copy</font></tt>)</tt>;</td>
<tr><td>&nbsp;</td></table>
<hr noshade>
<h2>Description:</h2>
  If you don't know what a mutex is, read a book. :-)<br><p>
<hr noshade>
<h2>Function Member Descriptions:</h2>
<a name="596"><font size=+1><b>CL_Mutex::CL_Mutex</b></font></a> -   Construct a new mutex.<br><tt></tt> <a href="CL_Mutex.html#596"><tt><font color=blue><b>CL_Mutex</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="595"><font size=+1><b>CL_Mutex::create</b></font></a> -   Call this to create a mutex. (provided for 0.4 backward compatibility)<br><tt><tt>static</tt> <a href="CL_Mutex.html#603"><tt><font color=blue><b>CL_Mutex</b></font></tt></a>*</tt> <a href="CL_Mutex.html#595"><tt><font color=blue><b>create</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="598"><font size=+1><b>CL_Mutex::enter</b></font></a> -   Enter the critical section.<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_Mutex.html#598"><tt><font color=blue><b>enter</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="599"><font size=+1><b>CL_Mutex::leave</b></font></a> -   Leave the critical section.<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_Mutex.html#599"><tt><font color=blue><b>leave</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="601"><font size=+1><b>CL_Mutex::notify</b></font></a> -   Notify wakes up the first thread that has gone to sleep on this  mutex in order to wait for a notification.<br>  For safety reasons, you are advised to acquire the mutex  using 'enter' before calling notify. (Of course you have to  release the mutex using 'leave' after notifying, otherwise the  waiting thread cannot reacquire it).<br> <br>  Warning: Not implemented under Win32. If you need it,  please implement it in Sources/Core/System/Win32/mutex_win32.*,  and send me the patch. :-)<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_Mutex.html#601"><tt><font color=blue><b>notify</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="602"><font size=+1><b>CL_Mutex::notify_all</b></font></a> -   NotifyAll wakes up all threads waiting on the mutex.<br>  Warning: Not implemented under Win32. If you need it,  please implement it in Sources/Core/System/Win32/mutex_win32.*,  and send me the patch. :-)<br>  See also: CL_Mutex::notify<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_Mutex.html#602"><tt><font color=blue><b>notify_all</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="600"><font size=+1><b>CL_Mutex::wait</b></font></a> -   wait releases the mutex this thread has taken out and sends the  thread to sleep.<br>  Other threads can then acquire the mutex and  modify any data. When another thread calls notify, the thread  that called wait will wake up again and automatically reacquire  the mutex.<br> <br>  Warning: This function must not be called on an unlocked   mutex. You must call enter first.<br> <br>  Warning: When wait returns (after another thread has called  notify/notifyAll, the current thread will have a mutex lock. Be  sure to call leave at some point.<br> <br>  Warning: Not implemented under Win32. If you need it,  please implement it in Sources/Core/System/Win32/mutex_win32.*,  and send me the patch. :-)<br><tt><tt><font color=purple>void</font></tt></tt> <a href="CL_Mutex.html#600"><tt><font color=blue><b>wait</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="597"><font size=+1><b>CL_Mutex::~CL_Mutex</b></font></a> -   Destroy mutex.<br><tt></tt> <a href="CL_Mutex.html#597"><tt><font color=blue><b>~CL_Mutex</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<hr noshade>
<h2>Variable Member Descriptions:</h2>
<hr noshade>
</body>
</html>