equal
deleted
inserted
replaced
21 |
21 |
22 |
22 |
23 #include "d_perflogger_ldd.h" |
23 #include "d_perflogger_ldd.h" |
24 #include <kernperflogger.h> |
24 #include <kernperflogger.h> |
25 |
25 |
|
26 _LIT(KDFCThreadName,"D_PL_DFC_THREAD"); |
|
27 const TInt KDFCThreadPriority=27; |
|
28 |
26 //----------------------------------------------------------------------------------- |
29 //----------------------------------------------------------------------------------- |
27 |
30 |
28 |
31 |
29 DKPLoggerTestHelperLDD* DKPLoggerTestHelperLDD::pSelf = NULL; //-- static pointer to the single instance of the logical channel class |
32 DKPLoggerTestHelperLDD* DKPLoggerTestHelperLDD::pSelf = NULL; //-- static pointer to the single instance of the logical channel class |
30 |
33 |
266 __NK_ASSERT_DEBUG(nRes == KErrNone); |
269 __NK_ASSERT_DEBUG(nRes == KErrNone); |
267 (void)nRes;//-- avoid warning in release mode |
270 (void)nRes;//-- avoid warning in release mode |
268 |
271 |
269 |
272 |
270 //-- initialize DFC machinery |
273 //-- initialize DFC machinery |
271 iDfcQ = Kern::DfcQue0(); //-- attach to the low priority DFC queue |
274 //iDfcQ = Kern::DfcQue0(); //-- attach to the low priority DFC queue |
|
275 if (!iDfcQ) |
|
276 { |
|
277 TInt r = Kern::DynamicDfcQCreate(iDfcQ, KDFCThreadPriority, KDFCThreadName); |
|
278 if (r!= KErrNone) |
|
279 { |
|
280 return; |
|
281 } |
|
282 |
|
283 #ifdef CPU_AFFINITY_ANY |
|
284 NKern::ThreadSetCpuAffinity((NThread*)(iDfcQ->iThread), KCpuAffinityAny); |
|
285 #endif |
|
286 } |
272 |
287 |
273 iIsrLogTicker.Construct (iClientThread, iDfcQ, NKern::EInterrupt);//-- construct ISR log ticker |
288 iIsrLogTicker.Construct (iClientThread, iDfcQ, NKern::EInterrupt);//-- construct ISR log ticker |
274 iDfcLogTicker.Construct (iClientThread, iDfcQ, NKern::EThread); //-- construct DFC log ticker |
289 iDfcLogTicker.Construct (iClientThread, iDfcQ, NKern::EThread); //-- construct DFC log ticker |
275 iIDfcLogTicker.Construct(iClientThread, iDfcQ, NKern::EIDFC); //-- construct IDFC log ticker |
290 iIDfcLogTicker.Construct(iClientThread, iDfcQ, NKern::EIDFC); //-- construct IDFC log ticker |
276 } |
291 } |
280 DKPLoggerTestHelperLDD::~DKPLoggerTestHelperLDD() |
295 DKPLoggerTestHelperLDD::~DKPLoggerTestHelperLDD() |
281 { |
296 { |
282 __PRINT("#KPLogTest:~DKPLoggerTestHelperLDD()"); |
297 __PRINT("#KPLogTest:~DKPLoggerTestHelperLDD()"); |
283 |
298 |
284 iClientThread->Close(NULL); |
299 iClientThread->Close(NULL); |
285 |
300 |
|
301 if (iDfcQ) |
|
302 iDfcQ->Destroy(); |
|
303 |
286 pSelf = NULL; //-- clear the pointer to this class instance |
304 pSelf = NULL; //-- clear the pointer to this class instance |
287 } |
305 } |
288 |
306 |
289 //----------------------------------------------------------------------------------- |
307 //----------------------------------------------------------------------------------- |
290 |
308 |