1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 3 <title>oscl_scheduler.h Source File</title> 4 <link href="doxygen.css" rel="stylesheet" type="text/css"> 5 </head><body> 6 <!-- Generated by Doxygen 1.2.18 --> 7 <center> 8 <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center> 9 <hr><h1>oscl_scheduler.h</h1><a href="oscl__scheduler_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 10 00013 <span class="preprocessor">#ifndef OSCL_SCHEDULER_H_INCLUDED</span> 11 00014 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_SCHEDULER_H_INCLUDED</span> 12 00015 <span class="preprocessor"></span> 13 00016 <span class="preprocessor">#ifndef OSCL_SCHEDULER_TYPES_H_INCLUDED</span> 14 00017 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__scheduler__types_8h.html">oscl_scheduler_types.h</a>"</span> 15 00018 <span class="preprocessor">#endif</span> 16 00019 <span class="preprocessor"></span> 17 00020 <span class="preprocessor">#ifndef OSCL_SCHEDULER_AO_H_INCLUDED</span> 18 00021 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__scheduler__ao_8h.html">oscl_scheduler_ao.h</a>"</span> 19 00022 <span class="preprocessor">#endif</span> 20 00023 <span class="preprocessor"></span> 21 00024 <span class="preprocessor">#ifndef OSCL_SCHEDULER_THREADCONTEXT_H_INCLUDED</span> 22 00025 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__scheduler__threadcontext_8h.html">oscl_scheduler_threadcontext.h</a>"</span> 23 00026 <span class="preprocessor">#endif</span> 24 00027 <span class="preprocessor"></span> 25 00028 <span class="preprocessor">#ifndef OSCL_MUTEX_H_INCLUDED</span> 26 00029 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__mutex_8h.html">oscl_mutex.h</a>"</span> 27 00030 <span class="preprocessor">#endif</span> 28 00031 <span class="preprocessor"></span> 29 00032 <span class="preprocessor">#ifndef OSCL_SEMAPHORE_H_INCLUDED</span> 30 00033 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__semaphore_8h.html">oscl_semaphore.h</a>"</span> 31 00034 <span class="preprocessor">#endif</span> 32 00035 <span class="preprocessor"></span> 33 00036 <span class="preprocessor">#ifndef OSCL_SCHEDULER_READYQ_H_INCLUDED</span> 34 00037 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__scheduler__readyq_8h.html">oscl_scheduler_readyq.h</a>"</span> 35 00038 <span class="preprocessor">#endif</span> 36 00039 <span class="preprocessor"></span> 37 00040 <span class="preprocessor">#ifndef OSCL_DEFALLOC_H_INCLUDED</span> 38 00041 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__defalloc_8h.html">oscl_defalloc.h</a>"</span> 39 00042 <span class="preprocessor">#endif</span> 40 00043 <span class="preprocessor"></span> 41 00044 <span class="preprocessor">#ifndef OSCL_MEM_H_INCLUDED</span> 42 00045 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__mem_8h.html">oscl_mem.h</a>"</span> 43 00046 <span class="preprocessor">#endif</span> 44 00047 <span class="preprocessor"></span> 45 00048 <span class="keyword">class </span><a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>; 46 00049 <span class="keyword">class </span>OsclCoeActiveScheduler; 47 00050 48 00051 49 <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> 50 00056 { 51 00057 <span class="keyword">public</span>: 52 00067 OSCL_IMPORT_REF <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classOsclScheduler.html#d0">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#a81">NULL</a>, <span class="keywordtype">int</span> nreserve = 20); 53 00068 54 00069 55 00074 OSCL_IMPORT_REF <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classOsclScheduler.html#d1">Cleanup</a>(); 56 00075 }; 57 00076 58 00077 59 <a name="l00082"></a><a class="code" href="group__osclproc.html#a9">00082</a> <span class="preprocessor">#define PVSCHEDNAMELEN 30</span> 60 00083 <span class="preprocessor"></span> 61 00084 <span class="keyword">class </span><a class="code" href="classPVSchedulerStopper.html">PVSchedulerStopper</a>; 62 00085 <span class="keyword">class </span>PVJump; 63 00086 <span class="keyword">class </span><a class="code" href="classPVLogger.html">PVLogger</a>; 64 00087 65 <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> 66 00096 { 67 00097 <span class="keyword">public</span>: 68 00107 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclSchedulerObserver.html#a0">OsclSchedulerTimerCallback</a>(<a class="code" href="group__osclbase.html#a25">OsclAny</a>* aContext, uint32 aDelayMsec) = 0; 69 00108 70 00118 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclSchedulerObserver.html#a1">OsclSchedulerReadyCallback</a>(<a class="code" href="group__osclbase.html#a25">OsclAny</a>* aContext) = 0; 71 00119 72 <a name="l00120"></a><a class="code" href="classOsclSchedulerObserver.html#a2">00120</a> <span class="keyword">virtual</span> <a class="code" href="classOsclSchedulerObserver.html#a2">~OsclSchedulerObserver</a>() {} 73 00121 }; 74 00122 75 00123 76 00124 <span class="comment">/*</span> 77 00125 <span class="comment">** A common base class for variations of OsclExecScheduler</span> 78 00126 <span class="comment">**/</span> 79 00127 80 <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> 81 00129 { 82 00130 <span class="keyword">public</span>: 83 00140 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a0">StartScheduler</a>(<a class="code" href="classOsclSemaphore.html">OsclSemaphore</a> *sem = <a class="code" href="group__osclbase.html#a81">NULL</a>); 84 00141 85 00146 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a1">StopScheduler</a>(); 86 00147 87 00152 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a2">SuspendScheduler</a>(); 88 00153 89 00158 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a3">ResumeScheduler</a>(); 90 00159 91 00165 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#a4">StartNativeScheduler</a>(); 92 00166 93 00170 OSCL_IMPORT_REF <span class="keyword">static</span> <a class="code" href="classOsclNameString.html">OsclNameString<PVSCHEDNAMELEN></a> *<a class="code" href="classOsclExecSchedulerCommonBase.html#d0">GetName</a>(); 94 00171 95 00175 OSCL_IMPORT_REF <span class="keyword">static</span> uint32 <a class="code" href="classOsclExecSchedulerCommonBase.html#d1">GetId</a>(); 96 00176 97 00177 98 00178 <span class="keyword">protected</span>: 99 00179 <span class="comment">/*</span> 100 00180 <span class="comment"> static OsclExecScheduler *NewL(const char *name,Oscl_DefAlloc *a,int nreserve);</span> 101 00181 <span class="comment"> */</span> 102 00182 <span class="keyword">virtual</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b0">~OsclExecSchedulerCommonBase</a>(); 103 00183 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b1">InstallScheduler</a>(); 104 00184 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b2">UninstallScheduler</a>(); 105 <a name="l00185"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#l0">00185</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclScheduler.html">OsclScheduler</a>; 106 00186 107 00187 <span class="keyword">protected</span>: 108 00188 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b3">Error</a>(int32 anError) <span class="keyword">const</span>; 109 00189 110 00190 <span class="keyword">protected</span>: 111 00191 <span class="keyword">static</span> <a class="code" href="classOsclExecSchedulerCommonBase.html">OsclExecSchedulerCommonBase</a>* <a class="code" href="classOsclExecSchedulerCommonBase.html#e0">GetScheduler</a>(); 112 00192 <span class="keyword">static</span> <a class="code" href="classOsclExecSchedulerCommonBase.html">OsclExecSchedulerCommonBase</a>* <a class="code" href="classOsclExecSchedulerCommonBase.html#e1">SetScheduler</a>(<a class="code" href="classOsclExecSchedulerCommonBase.html">OsclExecSchedulerCommonBase</a>*); 113 <a name="l00193"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#l1">00193</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPVThreadContext.html">PVThreadContext</a>; 114 <a name="l00194"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#l2">00194</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclExecSchedulerCommonBase.html#l2">OsclCoeActiveScheduler</a>; 115 00195 116 00196 <span class="keyword">protected</span>: 117 00197 <a class="code" href="classOsclExecSchedulerCommonBase.html#b4">OsclExecSchedulerCommonBase</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>*); 118 00198 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b5">ConstructL</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span>); 119 00199 120 00200 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b6">BeginScheduling</a>(<span class="keywordtype">bool</span> blocking, <span class="keywordtype">bool</span> native); 121 00201 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b7">EndScheduling</a>(); 122 00202 123 00203 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b8">BlockingLoopL</a>(); 124 00204 125 <a name="l00205"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n0">00205</a> <span class="keywordtype">bool</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#n0">iBlockingMode</a>;<span class="comment">//current blocking mode setting.</span> 126 <a name="l00206"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n1">00206</a> <span class="keywordtype">bool</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#n1">iNativeMode</a>;<span class="comment">//current native mode setting.</span> 127 00207 128 00208 <span class="keywordtype">bool</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b9">IsStarted</a>(); 129 00209 <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b10">IsInstalled</a>(); 130 00210 131 00211 <span class="comment">//Stopper AO is a special PV AO used to implement</span> 132 00212 <span class="comment">//the StopScheduler and SuspendScheduler functions.</span> 133 <a name="l00213"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n2">00213</a> <a class="code" href="classPVSchedulerStopper.html">PVSchedulerStopper</a> *<a class="code" href="classOsclExecSchedulerCommonBase.html#n2">iStopper</a>; 134 <a name="l00214"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n3">00214</a> <a class="code" href="classOsclMutex.html">OsclNoYieldMutex</a> <a class="code" href="classOsclExecSchedulerCommonBase.html#n3">iStopperCrit</a>; 135 00215 136 00216 <span class="comment">//Scheduler thread context</span> 137 <a name="l00217"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n4">00217</a> <a class="code" href="classPVThreadContext.html">PVThreadContext</a> <a class="code" href="classOsclExecSchedulerCommonBase.html#n4">iThreadContext</a>; 138 00218 139 00219 <span class="comment">//Scheduler name</span> 140 <a name="l00220"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n5">00220</a> <a class="code" href="classOsclNameString.html">OsclNameString<PVSCHEDNAMELEN></a> <a class="code" href="classOsclExecSchedulerCommonBase.html#n5">iName</a>; 141 00221 142 00222 <span class="comment">//For stop, suspend, and resume commands.</span> 143 <a name="l00223"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n6">00223</a> <span class="keywordtype">bool</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#n6">iDoStop</a>; 144 <a name="l00224"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n7">00224</a> <span class="keywordtype">bool</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#n7">iDoSuspend</a>; 145 <a name="l00225"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n8">00225</a> <span class="keywordtype">bool</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#n8">iSuspended</a>; 146 <a name="l00226"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n9">00226</a> <a class="code" href="classOsclSemaphore.html">OsclSemaphore</a> <a class="code" href="classOsclExecSchedulerCommonBase.html#n9">iResumeSem</a>; 147 00227 148 <a name="l00228"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n10">00228</a> <a class="code" href="classOsclErrorTrapImp.html">OsclErrorTrapImp</a>* <a class="code" href="classOsclExecSchedulerCommonBase.html#n10">iErrorTrapImp</a>; 149 00229 150 00230 <span class="comment">//Ready AO queue. The AOs in this queue are ready to run.</span> 151 <a name="l00231"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n11">00231</a> <a class="code" href="classOsclReadyQ.html">OsclReadyQ</a> <a class="code" href="classOsclExecSchedulerCommonBase.html#n11">iReadyQ</a>; 152 00232 153 00233 <span class="comment">//Pending Timer AO queue. The AOs in this queue are OsclTimerObjects</span> 154 00234 <span class="comment">//and have a timeout pending.</span> 155 <a name="l00235"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n12">00235</a> <a class="code" href="classOsclTimerQ.html">OsclTimerQ</a> <a class="code" href="classOsclExecSchedulerCommonBase.html#n12">iExecTimerQ</a>; 156 00236 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b11">AddToExecTimerQ</a>(<a class="code" href="classPVActiveBase.html">PVActiveBase</a> *active, uint32); 157 00237 158 00238 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b12">PendComplete</a>(<a class="code" href="classPVActiveBase.html">PVActiveBase</a> *, int32 aReason, <a class="code" href="group__osclproc.html#a20">TPVThreadContext</a> aContext); 159 00239 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b13">RequestCanceled</a>(<a class="code" href="classPVActiveBase.html">PVActiveBase</a>*); 160 00240 161 00241 <span class="comment">//Scheduling loop implementation.</span> 162 00242 <a class="code" href="classPVActiveBase.html">PVActiveBase</a>* <a class="code" href="classOsclExecSchedulerCommonBase.html#b14">UpdateTimers</a>(uint32 &aDelay); 163 00243 <a class="code" href="classPVActiveBase.html">PVActiveBase</a>* <a class="code" href="classOsclExecSchedulerCommonBase.html#b15">UpdateTimersMsec</a>(uint32 &aDelay); 164 00244 <a class="code" href="classPVActiveBase.html">PVActiveBase</a>* <a class="code" href="classOsclExecSchedulerCommonBase.html#b16">WaitForReadyAO</a>(); 165 00245 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b17">CallRunExec</a>(<a class="code" href="classPVActiveBase.html">PVActiveBase</a>*); 166 00246 167 <a name="l00247"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#q0">00247</a> <span class="keyword">static</span> <span class="keyword">const</span> uint32 <a class="code" href="classOsclExecSchedulerCommonBase.html#q0">iTimeCompareThreshold</a>; 168 <a name="l00248"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#l3">00248</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclTimerCompare.html">OsclTimerCompare</a>; 169 <a name="l00249"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#l4">00249</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclReadyQ.html">OsclReadyQ</a>; 170 00250 171 <a name="l00251"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#l5">00251</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclError.html">OsclError</a>; 172 00252 173 00253 174 00254 175 <a name="l00255"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n13">00255</a> uint32 <a class="code" href="classOsclExecSchedulerCommonBase.html#n13">iNumAOAdded</a>;<span class="comment">//for non-fair-scheduling sorts.</span> 176 00256 177 00257 <span class="comment">//For statistics</span> 178 00258 <span class="preprocessor">#if (PV_SCHED_ENABLE_AO_STATS)</span> 179 <a name="l00259"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n14">00259</a> <span class="preprocessor"></span> <a class="code" href="classOsclDoubleList.html">OsclDoubleList<PVActiveStats></a> <a class="code" href="classOsclExecSchedulerCommonBase.html#n14">iPVStatQ</a>;<span class="comment">//queue of all PV ExecObjs.</span> 180 <a name="l00260"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#t5">00260</a> <span class="keyword">enum</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#t5">TOtherExecStats</a> 181 00261 { 182 00262 <a class="code" href="classOsclExecSchedulerCommonBase.html#t5t0">EOtherExecStats_WaitTime</a> <span class="comment">//scheduler wait time</span> 183 00263 , <a class="code" href="classOsclExecSchedulerCommonBase.html#t5t1">EOtherExecStats_QueueTime</a> <span class="comment">//scheduler queue operation time</span> 184 00264 , <a class="code" href="classOsclExecSchedulerCommonBase.html#t5t2">EOtherExecStats_NativeOS</a> <span class="comment">//time in symbian native ExecObjs, not added by PV code (symbian only)</span> 185 00265 , <a class="code" href="classOsclExecSchedulerCommonBase.html#t5t3">EOtherExecStats_ReleaseTime</a> <span class="comment">//thread release time (Brew only)</span> 186 00266 , <a class="code" href="classOsclExecSchedulerCommonBase.html#t5t4">EOtherExecStats_Last</a> 187 00267 }; 188 <a name="l00268"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n15">00268</a> <a class="code" href="classPVActiveStats.html">PVActiveStats</a>* <a class="code" href="classOsclExecSchedulerCommonBase.html#n15">iOtherExecStats</a>[<a class="code" href="classOsclExecSchedulerCommonBase.html#t5t4">EOtherExecStats_Last</a>];<span class="comment">//placeholder for stats of all ExecObjs.</span> 189 00269 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b18">ConstructStatQ</a>(); 190 00270 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b19">BeginStats</a>(); 191 00271 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b20">EndStats</a>(); 192 00272 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#e2">ShowStats</a>(<a class="code" href="classPVActiveStats.html">PVActiveStats</a> *active); 193 00273 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#e3">ShowSummaryStats</a>(<a class="code" href="classPVActiveStats.html">PVActiveStats</a> *active, <a class="code" href="classPVLogger.html">PVLogger</a>*, <a class="code" href="group__osclbase.html#a30">int64</a>, <a class="code" href="group__osclbase.html#a30">int64</a>&, <span class="keywordtype">float</span>&); 194 00274 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b21">CleanupStatQ</a>(); 195 <a name="l00275"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n16">00275</a> uint8* <a class="code" href="classOsclExecSchedulerCommonBase.html#n16">iTotalTicksTemp</a>; 196 <a name="l00276"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n17">00276</a> <a class="code" href="group__osclbase.html#a30">int64</a> <a class="code" href="classOsclExecSchedulerCommonBase.html#n17">iGrandTotalTicks</a>; 197 <a name="l00277"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n18">00277</a> <span class="keywordtype">float</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#n18">iTotalPercent</a>; 198 <a name="l00278"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#l6">00278</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPVActiveStats.html">PVActiveStats</a>; 199 <a name="l00279"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n19">00279</a> uint32 <a class="code" href="classOsclExecSchedulerCommonBase.html#n19">iTime</a>; 200 <a name="l00280"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n20">00280</a> int32 <a class="code" href="classOsclExecSchedulerCommonBase.html#n20">iDelta</a>; 201 <a name="l00281"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n21">00281</a> <a class="code" href="classPVActiveStats.html">PVActiveStats</a>* <a class="code" href="classOsclExecSchedulerCommonBase.html#n21">iPVStats</a>; 202 00282 <span class="preprocessor">#endif //PV_SCHED_ENABLE_AO_STATS</span> 203 00283 <span class="preprocessor"></span> 204 00284 <span class="comment">//Queue utils.</span> 205 00285 <a class="code" href="classPVActiveBase.html">PVActiveBase</a> *<a class="code" href="classOsclExecSchedulerCommonBase.html#b22">FindPVBase</a>(<a class="code" href="classPVActiveBase.html">PVActiveBase</a> *active, <a class="code" href="classOsclDoubleList.html">OsclDoubleList<PVActiveBase></a> &); 206 00286 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b23">CleanupExecQ</a>(); 207 00287 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b24">InitExecQ</a>(<span class="keywordtype">int</span>); 208 00288 209 <a name="l00289"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n22">00289</a> <a class="code" href="classPVLogger.html">PVLogger</a> *<a class="code" href="classOsclExecSchedulerCommonBase.html#n22">iLogger</a>; 210 <a name="l00290"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n23">00290</a> <a class="code" href="classPVLogger.html">PVLogger</a>* <a class="code" href="classOsclExecSchedulerCommonBase.html#n23">iDebugLogger</a>; 211 00291 212 00292 <span class="preprocessor">#if(PV_SCHED_ENABLE_PERF_LOGGING)</span> 213 00293 <span class="preprocessor"></span> <span class="comment">//for perf logging</span> 214 <a name="l00294"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n24">00294</a> <span class="keywordtype">char</span>* <a class="code" href="classOsclExecSchedulerCommonBase.html#n24">iLogPerfIndentStr</a>; 215 <a name="l00295"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n25">00295</a> int32 <a class="code" href="classOsclExecSchedulerCommonBase.html#n25">iLogPerfIndentStrLen</a>; 216 <a name="l00296"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n26">00296</a> uint32 <a class="code" href="classOsclExecSchedulerCommonBase.html#n26">iLogPerfTotal</a>; 217 00297 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b25">ResetLogPerf</a>(); 218 00298 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b26">IncLogPerf</a>(uint32); 219 00299 <span class="preprocessor">#endif</span> 220 00300 <span class="preprocessor"></span> 221 <a name="l00301"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n27">00301</a> <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a> *<a class="code" href="classOsclExecSchedulerCommonBase.html#n27">iAlloc</a>;<span class="comment">//allocator for scheduler.</span> 222 <a name="l00302"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#n28">00302</a> <a class="code" href="classOsclMemAllocator.html">OsclMemAllocator</a> <a class="code" href="classOsclExecSchedulerCommonBase.html#n28">iDefAlloc</a>;<span class="comment">//default allocator</span> 223 00303 224 <a name="l00304"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#l7">00304</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclActiveObject.html">OsclActiveObject</a>; 225 <a name="l00305"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#l8">00305</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclTimerObject.html">OsclTimerObject</a>; 226 <a name="l00306"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#l9">00306</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPVActiveBase.html">PVActiveBase</a>; 227 <a name="l00307"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#l10">00307</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPVSchedulerStopper.html">PVSchedulerStopper</a>; 228 00308 229 00309 230 <a name="l00310"></a><a class="code" href="classOsclExecSchedulerCommonBase.html#l11">00310</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclExecScheduler.html">OsclExecScheduler</a>; 231 00311 }; 232 00312 233 00313 <span class="keyword">class </span><a class="code" href="classOsclErrorTrapImp.html">OsclErrorTrapImp</a>; 234 00314 235 <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> 236 00316 , <span class="keyword">public</span> <a class="code" href="classOsclExecSchedulerBase.html">OsclExecSchedulerBase</a> 237 00317 { 238 00318 <span class="keyword">public</span>: 239 00323 OSCL_IMPORT_REF <span class="keyword">static</span> <a class="code" href="classOsclExecScheduler.html">OsclExecScheduler</a>* <a class="code" href="classOsclExecScheduler.html#d0">Current</a>(); 240 00324 241 00347 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclExecScheduler.html#a0">RunSchedulerNonBlocking</a>(int32 aTargetCount, int32 &aReady, uint32 &aDelayMsec); 242 00348 243 00356 OSCL_IMPORT_REF <span class="keywordtype">void</span> <a class="code" href="classOsclExecScheduler.html#a1">RegisterForCallback</a>(<a class="code" href="classOsclSchedulerObserver.html">OsclSchedulerObserver</a>* aCallback, <a class="code" href="group__osclbase.html#a25">OsclAny</a>* aCallbackContext); 244 00357 245 00358 246 00359 <span class="keyword">private</span>: 247 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); 248 00361 ~<a class="code" href="classOsclExecScheduler.html">OsclExecScheduler</a>(); 249 <a name="l00362"></a><a class="code" href="classOsclExecScheduler.html#l0">00362</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOsclScheduler.html">OsclScheduler</a>; 250 00363 251 00364 252 00365 <a class="code" href="classOsclExecSchedulerCommonBase.html#l11">OsclExecScheduler</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>*); 253 00366 <span class="keywordtype">void</span> <a class="code" href="classOsclExecSchedulerCommonBase.html#b5">ConstructL</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span>); 254 00367 255 00368 }; 256 00369 257 00370 258 <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> 259 00376 { 260 00377 <span class="keyword">public</span>: 261 00378 <a class="code" href="classPVSchedulerStopper.html#a0">PVSchedulerStopper</a>(); 262 00379 <a class="code" href="classPVSchedulerStopper.html#a1">~PVSchedulerStopper</a>(); 263 00380 <span class="keyword">private</span>: 264 00381 <span class="keywordtype">void</span> <a class="code" href="classPVActiveBase.html#a4">Run</a>(); 265 00382 }; 266 00383 267 00384 268 00385 <span class="preprocessor">#endif</span> 269 00386 <span class="preprocessor"></span> 270 00387 271 </pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small> 272 <address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small> 273 </small></address> 274 </body> 275 </html> 276