kerneltest/e32test/mmu/d_shbuf.cpp
changeset 10 36bfc973b146
parent 9 96e5fb8b040d
equal deleted inserted replaced
9:96e5fb8b040d 10:36bfc973b146
   337 		break;
   337 		break;
   338 
   338 
   339 		// Descriptor writes
   339 		// Descriptor writes
   340 		case RShBufTestChannel::EFromTPtr8ProcessAndReturn:
   340 		case RShBufTestChannel::EFromTPtr8ProcessAndReturn:
   341 			{
   341 			{
   342 			TUint size = ((const TDes8*)a1)->Size();
   342 			TPtr8 tempPtr(0, 0, 0);
       
   343 			kumemget(&tempPtr, a1, sizeof(tempPtr));
       
   344 
       
   345 			TUint size = tempPtr.Size();
   343 			
   346 			
   344 			if(size <= sizeof(iDriverRxBuffer))
   347 			if(size <= sizeof(iDriverRxBuffer))
   345 				{
   348 				{
   346 				NKern::ThreadEnterCS();
   349 				NKern::ThreadEnterCS();
   347 				r = Kern::CreateAndPinVirtualMemory(iPin, (TLinAddr)((const TDes8*)a1)->Ptr(), size);
   350 				r = Kern::CreateAndPinVirtualMemory(iPin, (TLinAddr)tempPtr.Ptr(), size);
   348 				NKern::ThreadLeaveCS();
   351 				NKern::ThreadLeaveCS();
   349 				}
   352 				}
   350 			else
   353 			else
   351 				{
   354 				{
   352 				r = KErrNoMemory;
   355 				r = KErrNoMemory;