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
|
<HTML><HEAD><TITLE>MutexCounter Class</TITLE></HEAD>
<BODY bgcolor="#ffffff">
<H1>MutexCounter Class Reference</H1>
<p>
[<A HREF="index.html">APE Index</A>] [<A HREF="hier.html">APE Hierarchy</A>]
[<A HREF="header-list.html">Headers</A>]
</p>
<HR>
<P>Thread protected integer counter. <a href="#short">More...</a></P>
<P>
<code>
#include <<a href="thread-h.html">thread.h</a>>
</code>
</P>
<P>
Inherits: <a href="Mutex.html">Mutex</a>
<P>
<H2>Public Members</H2>
<UL>
<LI> <b><a name="ref0">MutexCounter</a></b> (int initial = 0)
</LI>
<LI>friend int <b><a name="ref1">operator ++</a></b> (MutexCounter &mc)
</LI>
<LI>friend int <b><a name="ref2">operator --</a></b> (MutexCounter &mc)
</LI>
</UL>
<HR>
<H2><a name="short">Detailed Description</a></H2>
<P>
The Mutex Counter is a counter variable which can safely be incremented
or decremented by multiple threads. A Mutex is used to protect access
to the counter variable (an integer). An initial value can be specified
for the counter, and it can be manipulated with the ++ and -- operators.
</P><HR>
<HR>
<TABLE WIDTH="100%"><TR><TD ALIGN="left" VALIGN="top">
<UL><LI><I>Author</I>: David Sugar <dyfet@ostel.com> </LI>
<LI>Documentation generated by dyfet@home.sys on Thu Dec 16 09:54:26 EST 1999
</LI>
</UL></TD><TD ALIGN="RIGHT" VALIGN="TOP">
<b>K</b><i>doc</i>
</TD>
</TR></TABLE></BODY></HTML>
|