kerneltest/e32test/resourceman/dynamicresource.cpp
branchRCL_3
changeset 62 4a8fed1c0ef6
parent 0 a41df078684a
--- a/kerneltest/e32test/resourceman/dynamicresource.cpp	Tue Feb 02 01:24:03 2010 +0200
+++ b/kerneltest/e32test/resourceman/dynamicresource.cpp	Sat Feb 20 00:10:51 2010 +0200
@@ -34,27 +34,21 @@
 DMLIGLSSHNDynamicResource::DMLIGLSSHNDynamicResource() : DDynamicPowerResource(KDMLIGLSSHNDynamicResource, -5), iMinLevel(-5), iMaxLevel(-10), iCurrentLevel(-5)
 	{
 	iFlags = KMultiLevel | KLongLatencySet | KShared | KSenseNegative;
-	NKern::LockSystem();
 	iBlockTime = MIN_BLOCK_TIME + Kern::Random() % MAX_BLOCK_TIME;
-	NKern::UnlockSystem();
 	}
 
 _LIT(KDBLGLSSHNDynamicResource, "DynamicResource3");
 DBLGLSSHNDynamicResource::DBLGLSSHNDynamicResource() : DDynamicPowerResource(KDBLGLSSHNDynamicResource, 1), iMinLevel(1), iMaxLevel(0), iCurrentLevel(1)
 	{
 	iFlags = KBinary | KLongLatencySet | KLongLatencyGet | KShared | KSenseNegative;
-	NKern::LockSystem();
 	iBlockTime = MIN_BLOCK_TIME + Kern::Random() % MAX_BLOCK_TIME;
-	NKern::UnlockSystem();
 	}
 
 _LIT(KDMLLGLSSHPDynamicResource, "DynamicResource4");
 DMLLGLSSHPDynamicResource::DMLLGLSSHPDynamicResource() : DDynamicPowerResource(KDMLLGLSSHPDynamicResource, 10), iMinLevel(10), iMaxLevel(20), iCurrentLevel(10)
 	{
 	iFlags = KMultiLevel | KLongLatencySet | KLongLatencyGet | KShared;
-	NKern::LockSystem();
 	iBlockTime = MIN_BLOCK_TIME + Kern::Random() % MAX_BLOCK_TIME;
-	NKern::UnlockSystem();
 	}
 
 //Constructors for dynamic dependent resources
@@ -63,36 +57,28 @@
 	{
 	// Make it a Instantaneous Resource.
 	iFlags = KMultiLevel;
-	NKern::LockSystem();
 	iBlockTime = MIN_BLOCK_TIME + Kern::Random() % MAX_BLOCK_TIME;
-	NKern::UnlockSystem();
 	}
 
 _LIT(KDDynamicResourceD02, "DynamicDependResourceDI");
 DDynamicResourceD02::DDynamicResourceD02() : DDynamicPowerResourceD(KDDynamicResourceD02, 0), iMinLevel(0), iMaxLevel(1), iCurrentLevel(0)
 	{
 	iFlags = KBinary | KLongLatencySet | KLongLatencyGet | KShared;
-	NKern::LockSystem();
 	iBlockTime = MIN_BLOCK_TIME + Kern::Random() % MAX_BLOCK_TIME;
-	NKern::UnlockSystem();
 	}
 
 _LIT(KDDynamicResourceD03, "DynamicDependResourceDJ");
 DDynamicResourceD03::DDynamicResourceD03() : DDynamicPowerResourceD(KDDynamicResourceD03, 19), iMinLevel(19), iMaxLevel(9), iCurrentLevel(19)
 	{
 	iFlags = KMultiLevel | KLongLatencySet | KShared | KSenseNegative;
-	NKern::LockSystem();
 	iBlockTime = MIN_BLOCK_TIME + Kern::Random() % MAX_BLOCK_TIME;
-	NKern::UnlockSystem();
 	}
 
 _LIT(KDDynamicResourceD04, "DynamicDependResourceDK");
 DDynamicResourceD04::DDynamicResourceD04() : DDynamicPowerResourceD(KDDynamicResourceD04, 0), iMinLevel(0), iMaxLevel(1), iCurrentLevel(0)
 	{
 	iFlags = KBinary | KLongLatencySet;
-	NKern::LockSystem();
 	iBlockTime = MIN_BLOCK_TIME + Kern::Random() % MAX_BLOCK_TIME;
-	NKern::UnlockSystem();
 	}
 
 //Get info implementation for dynamic resources