kerneltest/e32test/mmu/d_shadow.cpp
changeset 31 56f325a607ea
parent 0 a41df078684a
child 80 597aaf25e343
--- a/kerneltest/e32test/mmu/d_shadow.cpp	Mon Dec 21 16:14:42 2009 +0000
+++ b/kerneltest/e32test/mmu/d_shadow.cpp	Wed Dec 23 11:43:31 2009 +0000
@@ -222,10 +222,15 @@
 			}
 		case RShadow::EControlAllocPhys:
 			{
+			
 			TInt size=(TInt)a1;
 			TInt align=(TInt)a2;
 			TPhysAddr pa;
+		
+			NKern::ThreadEnterCS();
 			r=Epoc::AllocPhysicalRam(size,pa,align);
+			NKern::ThreadLeaveCS();
+			
 			if (r==KErrNone)
 				{
 				if (pa&0x0f)
@@ -233,20 +238,27 @@
 				else
 					r=pa>>4;
 				}
+			
 			break;
 			}
 		case RShadow::EControlFreePhys:
 			{
+			
 			TPhysAddr pa=(TPhysAddr)a1;
 			TInt size=(TInt)a2;
+			NKern::ThreadEnterCS();
 			r=Epoc::FreePhysicalRam(pa,size);
+			NKern::ThreadLeaveCS();
 			break;
 			}
 		case RShadow::EControlClaimPhys:
 			{
+			
 			TPhysAddr pa=(TPhysAddr)a1;
 			TInt size=(TInt)a2;
+			NKern::ThreadEnterCS();
 			r=Epoc::ClaimPhysicalRam(pa,size);
+			NKern::ThreadLeaveCS();
 			break;
 			}