1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
<HTML>
<HEAD>
<TITLE>class toSemaphore</TITLE>
<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
<TABLE BORDER="0">
<TR><TD valign="top" align="left" cellspacing="10">
<h1>class toSemaphore</h1>
</TD>
<TD valign="top" align="right" colspan="1"> Encapsulation of pthread semaphores. <small><A HREF="#longdesc">More...</A></small></TD></TR>
</TABLE>
<HR>
<TABLE BORDER="0">
<TR><TH>Definition</TH><TD><code>#include <<A HREF="tothread_h.html">tothread.h</A>></code></TD></TR>
<TR><TH><A HREF="full-list-toSemaphore.html">List of all Methods</A></TH></TR>
</TABLE>
</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Methods</h4><ul><LI> <b><A HREF="#ref4">toSemaphore</A></b> ()
</LI>
<LI> <b><A HREF="#ref5">toSemaphore</A></b> (int val)
</LI>
<LI> <b><A HREF="#ref6">~toSemaphore</A></b> ()
</LI>
<LI>void <b><A HREF="#ref7">up</A></b> ()
</LI>
<LI>void <b><A HREF="#ref8">down</A></b> ()
</LI>
<LI>int <b><A HREF="#ref9">getValue</A></b> ()
</LI>
<LI> <b><A HREF="#ref13">toSemaphore</A></b> ()
</LI>
<LI> <b><A HREF="#ref14">toSemaphore</A></b> (const <A HREF="toSemaphore.html">toSemaphore</A> &)
</LI>
<LI> <b><A HREF="#ref15">toSemaphore</A></b> (int val)
</LI>
<LI>void <b><A HREF="#ref16">up</A></b> ()
</LI>
<LI>void <b><A HREF="#ref17">down</A></b> ()
</LI>
<LI>int <b><A HREF="#ref18">getValue</A></b> ()
</LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p> Encapsulation of pthread semaphores. A semaphore can be raise to any value
but will wait till raised above zero when lowered below 0. Can also be implemented
without pthreads using Qt multithreaded primitives. Observe that these function
different than Qt semaphores.
</p>
<A NAME="toSemaphore"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>toSemaphore</strong> ()
<br></td><td align="right"><h3><strong>toSemaphore</strong></h3></td></tr></table><p></p><A NAME="toSemaphore"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>toSemaphore</strong> (int val)
<br></td><td align="right"><h3><strong>toSemaphore</strong></h3></td></tr></table><p></p><A NAME="~toSemaphore"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>~toSemaphore</strong> ()
<br></td><td align="right"><h3><strong>~toSemaphore</strong></h3></td></tr></table><p></p><A NAME="up"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>up</strong> ()
<br></td><td align="right"><h3><strong>up</strong></h3></td></tr></table><p></p><A NAME="down"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>down</strong> ()
<br></td><td align="right"><h3><strong>down</strong></h3></td></tr></table><p></p><A NAME="getValue"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int <strong>getValue</strong> ()
<br></td><td align="right"><h3><strong>getValue</strong></h3></td></tr></table><p></p><A NAME="toSemaphore"></A><A NAME="ref13"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>toSemaphore</strong> ()
<br></td><td align="right"><h3><strong>toSemaphore</strong></h3></td></tr></table><p></p><p> Create semaphore
</p>
<A NAME="toSemaphore"></A><A NAME="ref14"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>toSemaphore</strong> (const <A HREF="toSemaphore.html">toSemaphore</A> &)
<br></td><td align="right"><h3><strong>toSemaphore</strong></h3></td></tr></table><p></p><p> Unimplemented copy constructor.
</p>
<A NAME="toSemaphore"></A><A NAME="ref15"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>toSemaphore</strong> (int val)
<br></td><td align="right"><h3><strong>toSemaphore</strong></h3></td></tr></table><p></p><p> Create semaphore
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>val</i></TD><TD align="left" valign="top">Value of new semaphore.
</TD></TR>
</TABLE></P>
<A NAME="up"></A><A NAME="ref16"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>up</strong> ()
<br></td><td align="right"><h3><strong>up</strong></h3></td></tr></table><p></p><p> Increase semaphore value by 1.
</p>
<A NAME="down"></A><A NAME="ref17"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>down</strong> ()
<br></td><td align="right"><h3><strong>down</strong></h3></td></tr></table><p></p><p> Decrease semaphore value by 1, wait for it to never go below 0.
</p>
<A NAME="getValue"></A><A NAME="ref18"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int <strong>getValue</strong> ()
<br></td><td align="right"><h3><strong>getValue</strong></h3></td></tr></table><p></p><p> Get current semaphore value.
</p>
<HR>
<table>
<tr><td><small>Generated by: nneul on skyhawk on Wed Feb 23 19:49:58 2005, using kdoc 2.0a54.</small></td></tr>
</table>
</BODY>
</HTML>
|