--- a/kerneltest/e32test/benchmark/thread.cpp Mon Jun 21 17:12:14 2010 +0300
+++ b/kerneltest/e32test/benchmark/thread.cpp Thu Jul 15 20:11:42 2010 +0300
@@ -165,8 +165,10 @@
BM_ERROR(r, r == KErrNone);
child.Logon(st);
BMProgram::SetAbsPriority(RThread(), KBMPriorityLow);
+ TRequestStatus threadRunning;
+ child.Rendezvous(threadRunning);
child.Resume();
- User::After(1000); // Give the child thread a chance to run - killing it too earlier can leave the heap locked
+ User::WaitForRequest(threadRunning); // Wait for the thread to run before killing it.
BMProgram::SetAbsPriority(RThread(), KBMPriorityHigh);
TBMTicks t1;
::bmTimer.Stamp(&t1);
@@ -183,6 +185,7 @@
TInt Thread::KillingChild(TAny*)
{
+ RThread::Rendezvous(KErrNone);
User::WaitForAnyRequest();
return KErrNone;
}