aboutsummaryrefslogtreecommitdiff
path: root/doc/oscl_html/classOsclRefCounterMTSA.html
blob: 94814fdbb84d5c5a0b2c341fec846f47f55bcc6a (plain)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!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> TemplateOsclRefCounterMTSA&lt; DeallocType, LockType &gt; 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> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
<hr><h1>OsclRefCounterMTSA&lt; DeallocType, LockType &gt; Class Template Reference<br>
<small>
[<a class="el" href="group__osclbase.html">OSCL Base</a>]</small>
</h1><code>#include &lt;<a class="el" href="oscl__refcounter_8h-source.html">oscl_refcounter.h</a>&gt;</code>
<p>
<p>Inheritance diagram for OsclRefCounterMTSA&lt; DeallocType, LockType &gt;:
<p><center><img src="classOsclRefCounterMTSA.png" usemap="#OsclRefCounterMTSA< DeallocType, LockType >_map" border="0" alt=""></center>
<map name="OsclRefCounterMTSA< DeallocType, LockType >_map">
<area href="classOsclRefCounter.html" alt="OsclRefCounter" shape="rect" coords="0,0,296,24">
</map>
<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>&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterMTSA.html#a0">OsclRefCounterMTSA</a> (<a class="el" href="group__osclbase.html#a25">OsclAny</a> *p)</td></tr>
<tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterMTSA.html#a1">~OsclRefCounterMTSA</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterMTSA.html#a2">addRef</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterMTSA.html#a3">removeRef</a> ()</td></tr>
<tr><td nowrap align=right valign=top>uint32&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterMTSA.html#a4">getCount</a> ()</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class DeallocType, class LockType&gt;<br>
 class OsclRefCounterMTSA&lt; DeallocType, LockType &gt;</h3>

Implementation of <a class="el" href="classOsclRefCounterSA.html">OsclRefCounterSA</a> for multi-threaded use. A templated lock class must be specified. 
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="OsclRefCounterMTSA::OsclRefCounterMTSA"></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" colspan="4">
template&lt;class DeallocType, class LockType&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> OsclRefCounterMTSA&lt; DeallocType, LockType &gt;::OsclRefCounterMTSA </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__osclbase.html#a25">OsclAny</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>p</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructor Takes a pointer to the buffer to track.
<p>
When the reference count reaches zero, the buffer will be deleted by the deallocator. Also, the <a class="el" href="classOsclRefCounter.html">OsclRefCounter</a> object (this) will self-destruct when the reference count is zero. In some cases the <a class="el" href="classOsclRefCounter.html">OsclRefCounter</a> object will be part of the buffer being deleted. For such cases, the object pointer must be equal to the buffer pointer given at construction. If the object is not part of the buffer being deleted, it will self-destruct with a call to delete().<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>p</em>&nbsp;</td><td>
pointer to the buffer to track </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="a1" doxytag="OsclRefCounterMTSA::~OsclRefCounterMTSA"></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" colspan="4">
template&lt;class DeallocType, class LockType&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> virtual OsclRefCounterMTSA&lt; DeallocType, LockType &gt;::~OsclRefCounterMTSA </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [inline, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Destructor empty     </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a2" doxytag="OsclRefCounterMTSA::addRef"></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" colspan="4">
template&lt;class DeallocType, class LockType&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> void OsclRefCounterMTSA&lt; DeallocType, LockType &gt;::addRef </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [inline, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Add to the reference count 
<p>
Implements <a class="el" href="classOsclRefCounter.html#a0">OsclRefCounter</a>.    </td>
  </tr>
</table>
<a name="a4" doxytag="OsclRefCounterMTSA::getCount"></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" colspan="4">
template&lt;class DeallocType, class LockType&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> uint32 OsclRefCounterMTSA&lt; DeallocType, LockType &gt;::getCount </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [inline, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Gets the current number of references 
<p>
Implements <a class="el" href="classOsclRefCounter.html#a2">OsclRefCounter</a>.    </td>
  </tr>
</table>
<a name="a3" doxytag="OsclRefCounterMTSA::removeRef"></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" colspan="4">
template&lt;class DeallocType, class LockType&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> void OsclRefCounterMTSA&lt; DeallocType, LockType &gt;::removeRef </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [inline, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Remove from the reference count 
<p>
Implements <a class="el" href="classOsclRefCounter.html#a1">OsclRefCounter</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="oscl__refcounter_8h-source.html">oscl_refcounter.h</a></ul>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
</small></address>
</body>
</html>