kernel/eka/euser/us_test.cpp
branchRCL_3
changeset 87 2f92ad2dc5db
parent 0 a41df078684a
child 293 0659d0e1a03c
equal deleted inserted replaced
81:e7d2d738d3c2 87:2f92ad2dc5db
   547 			break;
   547 			break;
   548 			}
   548 			}
   549 		User::AfterHighRes(period);
   549 		User::AfterHighRes(period);
   550 		}
   550 		}
   551 	User::WaitForRequest(s);
   551 	User::WaitForRequest(s);
       
   552 
       
   553 	// There is a potential race condition, if the calling thread runs on a different CPU
       
   554 	// than the Supervisor thread, which can result in this thread being signaled
       
   555 	// before the RHandleBase gets fully closed (see DChangeNotifier::Complete()).
       
   556 	// For that reason, wait until Supervisor thread gets to idle, which is the indication
       
   557 	// that Complete() function has returned (DThread::Close() was called releasing memory),
       
   558 	// in the case that Kernel heap was checked just after current method returns.
       
   559 	UserSvr::HalFunction(EHalGroupKernel, EKernelHalSupervisorBarrier, (TAny*)timeout, NULL);
   552 	return r;
   560 	return r;
   553 	}
   561 	}
   554 
   562 
   555 
   563