aboutsummaryrefslogtreecommitdiff
path: root/doc/oscl_html/oscl__scheduler_8h_source.html
blob: e55a49abf7314191cd7ea961b82429319be9fdcc (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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>oscl: oscl_scheduler.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<h1>oscl_scheduler.h</h1><a href="oscl__scheduler_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00013"></a>00013 <span class="preprocessor">#ifndef OSCL_SCHEDULER_H_INCLUDED</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_SCHEDULER_H_INCLUDED</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span>
<a name="l00016"></a>00016 <span class="preprocessor">#ifndef OSCL_SCHEDULER_TYPES_H_INCLUDED</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="oscl__scheduler__types_8h.html" title="Scheduler common types include file.">oscl_scheduler_types.h</a>&quot;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#endif</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef OSCL_SCHEDULER_AO_H_INCLUDED</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="oscl__scheduler__ao_8h.html" title="Oscl Scheduler user execution object classes.">oscl_scheduler_ao.h</a>&quot;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#endif</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span>
<a name="l00024"></a>00024 <span class="preprocessor">#ifndef OSCL_SCHEDULER_THREADCONTEXT_H_INCLUDED</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="oscl__scheduler__threadcontext_8h.html" title="Thread context functions needed by oscl scheduler.">oscl_scheduler_threadcontext.h</a>&quot;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#endif</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef OSCL_MUTEX_H_INCLUDED</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="oscl__mutex_8h.html" title="This file provides implementation of mutex.">oscl_mutex.h</a>&quot;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#endif</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span>
<a name="l00032"></a>00032 <span class="preprocessor">#ifndef OSCL_SEMAPHORE_H_INCLUDED</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="oscl__semaphore_8h.html" title="This file provides implementation of mutex.">oscl_semaphore.h</a>&quot;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#endif</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span>
<a name="l00036"></a>00036 <span class="preprocessor">#ifndef OSCL_SCHEDULER_READYQ_H_INCLUDED</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="oscl__scheduler__readyq_8h.html" title="ready q types for oscl scheduler">oscl_scheduler_readyq.h</a>&quot;</span>
<a name="l00038"></a>00038 <span class="preprocessor">#endif</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span>
<a name="l00040"></a>00040 <span class="preprocessor">#ifndef OSCL_DEFALLOC_H_INCLUDED</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="oscl__defalloc_8h.html" title="The file defines simple default memory allocator classes. These allocators are used...">oscl_defalloc.h</a>&quot;</span>
<a name="l00042"></a>00042 <span class="preprocessor">#endif</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span>
<a name="l00044"></a>00044 <span class="preprocessor">#ifndef OSCL_MEM_H_INCLUDED</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="oscl__mem_8h.html" title="This file contains basic memory definitions for common use across platforms.">oscl_mem.h</a>&quot;</span>
<a name="l00046"></a>00046 <span class="preprocessor">#endif</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span>
<a name="l00048"></a>00048 <span class="keyword">class </span><a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>;
<a name="l00049"></a>00049 <span class="keyword">class </span>OsclCoeActiveScheduler;
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 
<a name="l00055"></a><a class="code" href="classOsclScheduler.html">00055</a> <span class="keyword">class </span><a class="code" href="classOsclScheduler.html">OsclScheduler</a>
<a name="l00056"></a>00056 {
<a name="l00057"></a>00057     <span class="keyword">public</span>:
<a name="l00067"></a>00067         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classOsclScheduler.html#a7da70fd0b9a43c726d63f8aca2143e99">Init</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> *alloc = <a class="code" href="group__osclbase.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="The NULL_TERM_CHAR is used to terminate c-style strings.">NULL</a>, <span class="keywordtype">int</span> nreserve = 20);
<a name="l00068"></a>00068 
<a name="l00069"></a>00069 
<a name="l00074"></a>00074         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classOsclScheduler.html#a2fb4107ee43488a7210edfadaa744cf4">Cleanup</a>();
<a name="l00075"></a>00075 };
<a name="l00076"></a>00076 
<a name="l00077"></a>00077 
<a name="l00082"></a><a class="code" href="group__osclproc.html#gaedbdfaa65d1923c7cd9b751b2b54ba55">00082</a> <span class="preprocessor">#define PVSCHEDNAMELEN 30</span>
<a name="l00083"></a>00083 <span class="preprocessor"></span>
<a name="l00084"></a>00084 <span class="keyword">class </span><a class="code" href="classPVSchedulerStopper.html">PVSchedulerStopper</a>;
<a name="l00085"></a>00085 <span class="keyword">class </span>PVJump;
<a name="l00086"></a>00086 <span class="keyword">class </span><a class="code" href="classPVLogger.html">PVLogger</a>;
<a name="l00087"></a>00087 
<a name="l00095"></a><a class="code" href="classOsclSchedulerObserver.html">00095</a> <span class="keyword">class </span><a class="code" href="classOsclSchedulerObserver.html">OsclSchedulerObserver</a>
<a name="l00096"></a>00096 {
<a name="l00097"></a>00097     <span class="keyword">public</span>:
<a name="l00107"></a>00107         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclSchedulerObserver.html#ac6e3a2785d9fb62c020e5787fe91a330">OsclSchedulerTimerCallback</a>(<a class="code" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89" title="The OsclAny is meant to be used the context of a generic pointer (i.e., no specific...">OsclAny</a>* aContext, uint32 aDelayMsec) = 0;
<a name="l00108"></a>00108 
<a name="l00118"></a>00118         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclSchedulerObserver.html#ae1a13f87e3ac7e4de305f3fd2d462bd5">OsclSchedulerReadyCallback</a>(<a class="code" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89" title="The OsclAny is meant to be used the context of a generic pointer (i.e., no specific...">OsclAny</a>* aContext) = 0;
<a name="l00119"></a>00119 
<a name="l00120"></a><a class="code" href="classOsclSchedulerObserver.html#a0acb91379f3d11f2fbf39bf740ad960c">00120</a>         <span class="keyword">virtual</span> <a class="code" href="classOsclSchedulerObserver.html#a0acb91379f3d11f2fbf39bf740ad960c">~OsclSchedulerObserver</a>() {}
<a name="l00121"></a>00121 };
<a name="l00122"></a>00122 
<a name="l00123"></a>00123 
<a name="l00124"></a>00124 <span class="comment">/*</span>
<a name="l00125"></a>00125 <span class="comment">** A common base class for variations of OsclExecScheduler</span>
<a name="l00126"></a>00126 <span class="comment">**/</span>
<a name="l00127"></a>00127 
<a name="l00128"></a><a class="code" href="classOsclExecSchedulerCommonBase.html">00128</a> <span class="keyword">class </span><a class="code" href="classOsclExecSchedulerCommonBase.html">OsclExecSchedulerCommonBase</a>
<a name="l00129"></a>00129 {
<a name="l00130"></a>00130     <span class="keyword">public</span>:
<a name="l00140"></a>00140         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#abcf893b9a3ba49ba1232df1c672a4600">StartScheduler</a>(<a class="code" href="classOsclSemaphore.html">OsclSemaphore</a> *sem = <a class="code" href="group__osclbase.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="The NULL_TERM_CHAR is used to terminate c-style strings.">NULL</a>);
<a name="l00141"></a>00141 
<a name="l00146"></a>00146         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a57c359f97b5a8bf3095a4af413a4ac72">StopScheduler</a>();
<a name="l00147"></a>00147 
<a name="l00152"></a>00152         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a9f084527d65674b23a931078ec3896f1">SuspendScheduler</a>();
<a name="l00153"></a>00153 
<a name="l00158"></a>00158         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a546ad8666a3d604584bf432477352fb6">ResumeScheduler</a>();
<a name="l00159"></a>00159 
<a name="l00165"></a>00165         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a58c994b3dc302012960fcaba174cfedd">StartNativeScheduler</a>();
<a name="l00166"></a>00166 
<a name="l00170"></a>00170         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keyword">static</span> <a class="code" href="classOsclNameString.html">OsclNameString&lt;PVSCHEDNAMELEN&gt;</a> *<a class="code" href="classOsclExecSchedulerCommonBase.html#a97341e243980182ce5dba661f104da00">GetName</a>();
<a name="l00171"></a>00171 
<a name="l00175"></a>00175         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keyword">static</span> uint32 <a class="code" href="classOsclExecSchedulerCommonBase.html#aa28644fd385dbaca4d7730ba430d5aa5">GetId</a>();
<a name="l00176"></a>00176 
<a name="l00177"></a>00177 
<a name="l00178"></a>00178     <span class="keyword">protected</span>:
<a name="l00179"></a>00179         <span class="comment">/*</span>
<a name="l00180"></a>00180 <span class="comment">        static OsclExecScheduler *NewL(const char *name,Oscl_DefAlloc *a,int nreserve);</span>
<a name="l00181"></a>00181 <span class="comment">        */</span>
<a name="l00182"></a>00182         <span class="keyword">virtual</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#ae212c288e323c839dbd857b75e39e521">~OsclExecSchedulerCommonBase</a>();
<a name="l00183"></a>00183         <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a219c6b6ee50c6a372cf7674634b94d6d">InstallScheduler</a>();
<a name="l00184"></a>00184         <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#aca845d2be0263aa8d44b452f3ab726c6">UninstallScheduler</a>();
<a name="l00185"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a7148d4faec6e2de609c3d9bc610c3128">00185</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclScheduler.html">OsclScheduler</a>;
<a name="l00186"></a>00186 
<a name="l00187"></a>00187     <span class="keyword">protected</span>:
<a name="l00188"></a>00188         <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a4e7410df7c2aed321ee7e9e8e7ff28d2">Error</a>(int32 anError) <span class="keyword">const</span>;
<a name="l00189"></a>00189 
<a name="l00190"></a>00190     <span class="keyword">protected</span>:
<a name="l00191"></a>00191         <span class="keyword">static</span> <a class="code" href="classOsclExecSchedulerCommonBase.html">OsclExecSchedulerCommonBase</a>* <a class="code" href="classOsclExecSchedulerCommonBase.html#a238e769a7094e69f77a4f5996e474bca">GetScheduler</a>();
<a name="l00192"></a>00192         <span class="keyword">static</span> <a class="code" href="classOsclExecSchedulerCommonBase.html">OsclExecSchedulerCommonBase</a>* <a class="code" href="classOsclExecSchedulerCommonBase.html#acbdfe6a5830f9beab5712f3c837543cb">SetScheduler</a>(<a class="code" href="classOsclExecSchedulerCommonBase.html">OsclExecSchedulerCommonBase</a>*);
<a name="l00193"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a8afaf5f8176ea2bc93dbba299ae5119f">00193</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPVThreadContext.html">PVThreadContext</a>;
<a name="l00194"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#af93b8ddd31308e572d053f0fcbbca457">00194</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclExecSchedulerCommonBase.html#af93b8ddd31308e572d053f0fcbbca457">OsclCoeActiveScheduler</a>;
<a name="l00195"></a>00195 
<a name="l00196"></a>00196     <span class="keyword">protected</span>:
<a name="l00197"></a>00197         <a class="code" href="classOsclExecSchedulerCommonBase.html#a2fb90b6aa74370851539a4034fa97a59">OsclExecSchedulerCommonBase</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>*);
<a name="l00198"></a>00198         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a11275452da71b749ab65f3932729b235">ConstructL</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span>);
<a name="l00199"></a>00199 
<a name="l00200"></a>00200         <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a3bf32a467a3d04b20550254c5a737c94">BeginScheduling</a>(<span class="keywordtype">bool</span> blocking, <span class="keywordtype">bool</span> native);
<a name="l00201"></a>00201         <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a3b3495ec591c85e39257b1a49daf1a9b">EndScheduling</a>();
<a name="l00202"></a>00202 
<a name="l00203"></a>00203         <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#ac19cadd7231a6d2e5054eb9c6e9dbdfe">BlockingLoopL</a>();
<a name="l00204"></a>00204 
<a name="l00205"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a147900ae0c21706b7ef83e22653162b2">00205</a>         <span class="keywordtype">bool</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a147900ae0c21706b7ef83e22653162b2">iBlockingMode</a>;<span class="comment">//current blocking mode setting.</span>
<a name="l00206"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#aa8357e5b876ca6c782d4b17791c3ebe9">00206</a>         <span class="keywordtype">bool</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#aa8357e5b876ca6c782d4b17791c3ebe9">iNativeMode</a>;<span class="comment">//current native mode setting.</span>
<a name="l00207"></a>00207 
<a name="l00208"></a>00208         <span class="keywordtype">bool</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#ad68a4301e1db5c3ac87bf9e1696f3ef5">IsStarted</a>();
<a name="l00209"></a>00209         <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a62fd86c3618d1af79555c7dde1c73ca9">IsInstalled</a>();
<a name="l00210"></a>00210 
<a name="l00211"></a>00211         <span class="comment">//Stopper AO is a special PV AO used to implement</span>
<a name="l00212"></a>00212         <span class="comment">//the StopScheduler and SuspendScheduler functions.</span>
<a name="l00213"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a7a94ddaebbc22b3e1ead5db430a38a78">00213</a>         <a class="code" href="classPVSchedulerStopper.html">PVSchedulerStopper</a> *<a class="code" href="classOsclExecSchedulerCommonBase.html#a7a94ddaebbc22b3e1ead5db430a38a78">iStopper</a>;
<a name="l00214"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#acdc50cb1459c7af683f73d40722f0dbb">00214</a>         <a class="code" href="classOsclMutex.html">OsclNoYieldMutex</a> <a class="code" href="classOsclExecSchedulerCommonBase.html#acdc50cb1459c7af683f73d40722f0dbb">iStopperCrit</a>;
<a name="l00215"></a>00215 
<a name="l00216"></a>00216         <span class="comment">//Scheduler thread context</span>
<a name="l00217"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a6ec0af700332d8a58efb374bc12066b7">00217</a>         <a class="code" href="classPVThreadContext.html">PVThreadContext</a> <a class="code" href="classOsclExecSchedulerCommonBase.html#a6ec0af700332d8a58efb374bc12066b7">iThreadContext</a>;
<a name="l00218"></a>00218 
<a name="l00219"></a>00219         <span class="comment">//Scheduler name</span>
<a name="l00220"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#aad0e029a221fdc48c8eca7361ad686d0">00220</a>         <a class="code" href="classOsclNameString.html">OsclNameString&lt;PVSCHEDNAMELEN&gt;</a> <a class="code" href="classOsclExecSchedulerCommonBase.html#aad0e029a221fdc48c8eca7361ad686d0">iName</a>;
<a name="l00221"></a>00221 
<a name="l00222"></a>00222         <span class="comment">//For stop, suspend, and resume commands.</span>
<a name="l00223"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a8153b059001566170de33562a92b17bb">00223</a>         <span class="keywordtype">bool</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a8153b059001566170de33562a92b17bb">iDoStop</a>;
<a name="l00224"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a8245dbb88be38ebd465b4a66cd022436">00224</a>         <span class="keywordtype">bool</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a8245dbb88be38ebd465b4a66cd022436">iDoSuspend</a>;
<a name="l00225"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a2826f693da5a18b1e0e5984d13460d99">00225</a>         <span class="keywordtype">bool</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a2826f693da5a18b1e0e5984d13460d99">iSuspended</a>;
<a name="l00226"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a7faa589d0ddb1a78aac1e915371dc03a">00226</a>         <a class="code" href="classOsclSemaphore.html">OsclSemaphore</a> <a class="code" href="classOsclExecSchedulerCommonBase.html#a7faa589d0ddb1a78aac1e915371dc03a">iResumeSem</a>;
<a name="l00227"></a>00227 
<a name="l00228"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a85904de923ca2c17d319987d24c73ef2">00228</a>         <a class="code" href="classOsclErrorTrapImp.html">OsclErrorTrapImp</a>* <a class="code" href="classOsclExecSchedulerCommonBase.html#a85904de923ca2c17d319987d24c73ef2">iErrorTrapImp</a>;
<a name="l00229"></a>00229 
<a name="l00230"></a>00230         <span class="comment">//Ready AO queue.  The AOs in this queue are ready to run.</span>
<a name="l00231"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#ab0b56b6b5db01f341defc5a0f3dba468">00231</a>         <a class="code" href="classOsclReadyQ.html">OsclReadyQ</a> <a class="code" href="classOsclExecSchedulerCommonBase.html#ab0b56b6b5db01f341defc5a0f3dba468">iReadyQ</a>;
<a name="l00232"></a>00232 
<a name="l00233"></a>00233         <span class="comment">//Pending Timer AO queue.  The AOs in this queue are OsclTimerObjects</span>
<a name="l00234"></a>00234         <span class="comment">//and have a timeout pending.</span>
<a name="l00235"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#afc443754f4df45b622d89c91139702ba">00235</a>         <a class="code" href="classOsclTimerQ.html">OsclTimerQ</a> <a class="code" href="classOsclExecSchedulerCommonBase.html#afc443754f4df45b622d89c91139702ba">iExecTimerQ</a>;
<a name="l00236"></a>00236         <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a25bfa6923e62e3c6ef69fffaa6e694df">AddToExecTimerQ</a>(<a class="code" href="classPVActiveBase.html">PVActiveBase</a> *active, uint32);
<a name="l00237"></a>00237 
<a name="l00238"></a>00238         <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a867c37dec2b2bdebf1e10443277abb64">PendComplete</a>(<a class="code" href="classPVActiveBase.html">PVActiveBase</a> *, int32 aReason, <a class="code" href="group__osclproc.html#gafccd0477e3686b352aae41267d094dc4">TPVThreadContext</a> aContext);
<a name="l00239"></a>00239         <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#ad58318e293ec1e0c5ca23083f8a1d2b5">RequestCanceled</a>(<a class="code" href="classPVActiveBase.html">PVActiveBase</a>*);
<a name="l00240"></a>00240 
<a name="l00241"></a>00241         <span class="comment">//Scheduling loop implementation.</span>
<a name="l00242"></a>00242         <a class="code" href="classPVActiveBase.html">PVActiveBase</a>* <a class="code" href="classOsclExecSchedulerCommonBase.html#a3e8851719f275acd5d0f7188f49c69e3">UpdateTimers</a>(uint32 &amp;aDelay);
<a name="l00243"></a>00243         <a class="code" href="classPVActiveBase.html">PVActiveBase</a>* <a class="code" href="classOsclExecSchedulerCommonBase.html#a3bb2282b46875ed594ea080df5722fa9">UpdateTimersMsec</a>(uint32 &amp;aDelay);
<a name="l00244"></a>00244         <a class="code" href="classPVActiveBase.html">PVActiveBase</a>* <a class="code" href="classOsclExecSchedulerCommonBase.html#a95d829bd5aeda3191f8384f41c72ec03">WaitForReadyAO</a>();
<a name="l00245"></a>00245         <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a5ded2b2f4b9e9ba2fdaa414f6d276798">CallRunExec</a>(<a class="code" href="classPVActiveBase.html">PVActiveBase</a>*);
<a name="l00246"></a>00246 
<a name="l00247"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a9b7f64984df6b3b75cb704367404a27b">00247</a>         <span class="keyword">static</span> <span class="keyword">const</span> uint32 <a class="code" href="classOsclExecSchedulerCommonBase.html#a9b7f64984df6b3b75cb704367404a27b">iTimeCompareThreshold</a>;
<a name="l00248"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#ac578db89d77e6d9b33728f7056f645fb">00248</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclTimerCompare.html">OsclTimerCompare</a>;
<a name="l00249"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a7a82d45b46262e500040b56bce8bf632">00249</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclReadyQ.html">OsclReadyQ</a>;
<a name="l00250"></a>00250 
<a name="l00251"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a2a481999b1435aad6b24de7166811742">00251</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclError.html">OsclError</a>;
<a name="l00252"></a>00252 
<a name="l00253"></a>00253 
<a name="l00254"></a>00254 
<a name="l00255"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a36bc2cdd3f5ffc1a602503381c691d0a">00255</a>         uint32 <a class="code" href="classOsclExecSchedulerCommonBase.html#a36bc2cdd3f5ffc1a602503381c691d0a">iNumAOAdded</a>;<span class="comment">//for non-fair-scheduling sorts.</span>
<a name="l00256"></a>00256 
<a name="l00257"></a>00257         <span class="comment">//For statistics</span>
<a name="l00258"></a>00258 <span class="preprocessor">#if (PV_SCHED_ENABLE_AO_STATS)</span>
<a name="l00259"></a>00259 <span class="preprocessor"></span>        <a class="code" href="classOsclDoubleList.html">OsclDoubleList&lt;PVActiveStats&gt;</a> iPVStatQ;<span class="comment">//queue of all PV ExecObjs.</span>
<a name="l00260"></a>00260         <span class="keyword">enum</span> TOtherExecStats
<a name="l00261"></a>00261         {
<a name="l00262"></a>00262             EOtherExecStats_WaitTime <span class="comment">//scheduler wait time</span>
<a name="l00263"></a>00263             , EOtherExecStats_QueueTime <span class="comment">//scheduler queue operation time</span>
<a name="l00264"></a>00264             , EOtherExecStats_NativeOS <span class="comment">//time in symbian native ExecObjs, not added by PV code (symbian only)</span>
<a name="l00265"></a>00265             , EOtherExecStats_ReleaseTime <span class="comment">//thread release time (Brew only)</span>
<a name="l00266"></a>00266             , EOtherExecStats_Last
<a name="l00267"></a>00267         };
<a name="l00268"></a>00268         PVActiveStats* iOtherExecStats[EOtherExecStats_Last];<span class="comment">//placeholder for stats of all ExecObjs.</span>
<a name="l00269"></a>00269         <span class="keywordtype">void</span> ConstructStatQ();
<a name="l00270"></a>00270         <span class="keywordtype">void</span> BeginStats();
<a name="l00271"></a>00271         <span class="keywordtype">void</span> EndStats();
<a name="l00272"></a>00272         <span class="keyword">static</span> <span class="keywordtype">void</span> ShowStats(PVActiveStats *active);
<a name="l00273"></a>00273         <span class="keyword">static</span> <span class="keywordtype">void</span> ShowSummaryStats(PVActiveStats *active, <a class="code" href="classPVLogger.html">PVLogger</a>*, <a class="code" href="group__osclbase.html#gad3ba4095e745890683ed3aa53c47384d">int64</a>, <a class="code" href="group__osclbase.html#gad3ba4095e745890683ed3aa53c47384d">int64</a>&amp;, <span class="keywordtype">float</span>&amp;);
<a name="l00274"></a>00274         <span class="keywordtype">void</span> CleanupStatQ();
<a name="l00275"></a>00275         uint8* iTotalTicksTemp;
<a name="l00276"></a>00276         <a class="code" href="group__osclbase.html#gad3ba4095e745890683ed3aa53c47384d">int64</a> iGrandTotalTicks;
<a name="l00277"></a>00277         <span class="keywordtype">float</span> iTotalPercent;
<a name="l00278"></a>00278         <span class="keyword">friend</span> <span class="keyword">class </span>PVActiveStats;
<a name="l00279"></a>00279         uint32 iTime;
<a name="l00280"></a>00280         int32 iDelta;
<a name="l00281"></a>00281         PVActiveStats* iPVStats;
<a name="l00282"></a>00282 <span class="preprocessor">#endif //PV_SCHED_ENABLE_AO_STATS</span>
<a name="l00283"></a>00283 <span class="preprocessor"></span>
<a name="l00284"></a>00284         <span class="comment">//Queue utils.</span>
<a name="l00285"></a>00285         <a class="code" href="classPVActiveBase.html">PVActiveBase</a> *<a class="code" href="classOsclExecSchedulerCommonBase.html#a6141d236fb5373da454a1fd8fe61b297">FindPVBase</a>(<a class="code" href="classPVActiveBase.html">PVActiveBase</a> *active, <a class="code" href="classOsclDoubleList.html">OsclDoubleList&lt;PVActiveBase&gt;</a> &amp;);
<a name="l00286"></a>00286         <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#ac6f422948c66f96afbe66e7b00602159">CleanupExecQ</a>();
<a name="l00287"></a>00287         <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a22611e71a4bae578d5d850c2795602ac">InitExecQ</a>(<span class="keywordtype">int</span>);
<a name="l00288"></a>00288 
<a name="l00289"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a3b0cc2fafd28f184d9421044a2d44e7c">00289</a>         <a class="code" href="classPVLogger.html">PVLogger</a> *<a class="code" href="classOsclExecSchedulerCommonBase.html#a3b0cc2fafd28f184d9421044a2d44e7c">iLogger</a>;
<a name="l00290"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a181d2ad948cff079e1bc5935d5958fad">00290</a>         <a class="code" href="classPVLogger.html">PVLogger</a>* <a class="code" href="classOsclExecSchedulerCommonBase.html#a181d2ad948cff079e1bc5935d5958fad">iDebugLogger</a>;
<a name="l00291"></a>00291 
<a name="l00292"></a>00292 <span class="preprocessor">#if(PV_SCHED_ENABLE_PERF_LOGGING)</span>
<a name="l00293"></a>00293 <span class="preprocessor"></span>        <span class="comment">//for perf logging</span>
<a name="l00294"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a629f1eee66936ca1773636caba313a1b">00294</a>         <span class="keywordtype">char</span>* <a class="code" href="classOsclExecSchedulerCommonBase.html#a629f1eee66936ca1773636caba313a1b">iLogPerfIndentStr</a>;
<a name="l00295"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a06615729c54b479ec8bb81f420fae3a6">00295</a>         int32 <a class="code" href="classOsclExecSchedulerCommonBase.html#a06615729c54b479ec8bb81f420fae3a6">iLogPerfIndentStrLen</a>;
<a name="l00296"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a80999e1db10fb4cddd90802ee5f37e55">00296</a>         uint32 <a class="code" href="classOsclExecSchedulerCommonBase.html#a80999e1db10fb4cddd90802ee5f37e55">iLogPerfTotal</a>;
<a name="l00297"></a>00297         <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#ab12e18c2d7b5c69cd1e9d33cf38d047f">ResetLogPerf</a>();
<a name="l00298"></a>00298         <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a3cbcf541de196ae6bf871d1222f574ef">IncLogPerf</a>(uint32);
<a name="l00299"></a>00299 <span class="preprocessor">#endif</span>
<a name="l00300"></a>00300 <span class="preprocessor"></span>
<a name="l00301"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a9237bcc4a6822b038af4e7034d7dc153">00301</a>         <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> *<a class="code" href="classOsclExecSchedulerCommonBase.html#a9237bcc4a6822b038af4e7034d7dc153">iAlloc</a>;<span class="comment">//allocator for scheduler.</span>
<a name="l00302"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#ac3f6a2dc22e92538ca9ac2389612e202">00302</a>         <a class="code" href="classOsclMemAllocator.html">OsclMemAllocator</a> <a class="code" href="classOsclExecSchedulerCommonBase.html#ac3f6a2dc22e92538ca9ac2389612e202">iDefAlloc</a>;<span class="comment">//default allocator</span>
<a name="l00303"></a>00303 
<a name="l00304"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a7f524fe98519510ce0d898e0388bc1bd">00304</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclActiveObject.html">OsclActiveObject</a>;
<a name="l00305"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#adf152df798975e05b88d70ab9c7ba327">00305</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclTimerObject.html">OsclTimerObject</a>;
<a name="l00306"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a04d62862c3c2673d0c21d23cf0f11dc9">00306</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPVActiveBase.html">PVActiveBase</a>;
<a name="l00307"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#ac2824a044b4fd8cbe99403e561cff52b">00307</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPVSchedulerStopper.html">PVSchedulerStopper</a>;
<a name="l00308"></a>00308 
<a name="l00309"></a>00309 
<a name="l00310"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#a72134ea98f047ad06cef43d09de4d5cf">00310</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclExecScheduler.html">OsclExecScheduler</a>;
<a name="l00311"></a>00311 };
<a name="l00312"></a>00312 
<a name="l00313"></a>00313 <span class="keyword">class </span><a class="code" href="classOsclErrorTrapImp.html">OsclErrorTrapImp</a>;
<a name="l00314"></a>00314 
<a name="l00315"></a><a class="code" href="classOsclExecScheduler.html">00315</a> <span class="keyword">class </span><a class="code" href="classOsclExecScheduler.html">OsclExecScheduler</a>: <span class="keyword">public</span> <a class="code" href="classOsclExecSchedulerCommonBase.html">OsclExecSchedulerCommonBase</a>
<a name="l00316"></a>00316         , <span class="keyword">public</span> <a class="code" href="classOsclExecSchedulerBase.html">OsclExecSchedulerBase</a>
<a name="l00317"></a>00317 {
<a name="l00318"></a>00318     <span class="keyword">public</span>:
<a name="l00323"></a>00323         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keyword">static</span> <a class="code" href="classOsclExecScheduler.html">OsclExecScheduler</a>* <a class="code" href="classOsclExecScheduler.html#a59ee15c5938a70f0f1ad68cb1cc1f544">Current</a>();
<a name="l00324"></a>00324 
<a name="l00347"></a>00347         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classOsclExecScheduler.html#ab70e0d3dba7002212979ccf98631fe3e">RunSchedulerNonBlocking</a>(int32 aTargetCount, int32 &amp;aReady, uint32 &amp;aDelayMsec);
<a name="l00348"></a>00348 
<a name="l00356"></a>00356         <a class="code" href="osclconfig_8h.html#a6de0f53c5c11f8f53ce72c70d74d9abc">OSCL_IMPORT_REF</a> <span class="keywordtype">void</span> <a class="code" href="classOsclExecScheduler.html#a5c451efaf429738b927fd07cc8976bfa">RegisterForCallback</a>(<a class="code" href="classOsclSchedulerObserver.html">OsclSchedulerObserver</a>* aCallback, <a class="code" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89" title="The OsclAny is meant to be used the context of a generic pointer (i.e., no specific...">OsclAny</a>* aCallbackContext);
<a name="l00357"></a>00357 
<a name="l00358"></a>00358 
<a name="l00359"></a>00359     <span class="keyword">private</span>:
<a name="l00360"></a>00360         <span class="keyword">static</span> <a class="code" href="classOsclExecScheduler.html">OsclExecScheduler</a> *NewL(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> *a, <span class="keywordtype">int</span> nreserve);
<a name="l00361"></a>00361         ~<a class="code" href="classOsclExecScheduler.html">OsclExecScheduler</a>();
<a name="l00362"></a><a class="code" href="classOsclExecScheduler.html#a7148d4faec6e2de609c3d9bc610c3128">00362</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclScheduler.html">OsclScheduler</a>;
<a name="l00363"></a>00363 
<a name="l00364"></a>00364 
<a name="l00365"></a>00365         <a class="code" href="classOsclExecScheduler.html">OsclExecScheduler</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>*);
<a name="l00366"></a>00366         <span class="keywordtype">void</span> ConstructL(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span>);
<a name="l00367"></a>00367 
<a name="l00368"></a>00368 };
<a name="l00369"></a>00369 
<a name="l00370"></a>00370 
<a name="l00375"></a><a class="code" href="classPVSchedulerStopper.html">00375</a> <span class="keyword">class </span><a class="code" href="classPVSchedulerStopper.html">PVSchedulerStopper</a>: <span class="keyword">public</span> <a class="code" href="classOsclActiveObject.html">OsclActiveObject</a>
<a name="l00376"></a>00376 {
<a name="l00377"></a>00377     <span class="keyword">public</span>:
<a name="l00378"></a>00378         <a class="code" href="classPVSchedulerStopper.html#a92b4b9c8bf334133d97e88f00c7dd9eb">PVSchedulerStopper</a>();
<a name="l00379"></a>00379         <a class="code" href="classPVSchedulerStopper.html#a231a85729a39eb392083d1861df90d8f">~PVSchedulerStopper</a>();
<a name="l00380"></a>00380     <span class="keyword">private</span>:
<a name="l00381"></a>00381         <span class="keywordtype">void</span> Run();
<a name="l00382"></a>00382 };
<a name="l00383"></a>00383 
<a name="l00384"></a>00384 
<a name="l00385"></a>00385 <span class="preprocessor">#endif</span>
<a name="l00386"></a>00386 <span class="preprocessor"></span>
<a name="l00387"></a>00387 
</pre></div></div>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: CORE_9.004.1.1 </small>
</small></address>
</body>
</html>