kernel/eka/memmodel/epoc/flexible/mmu/mdatapaging.cpp
changeset 109 b3a1d9898418
parent 90 947f0dc9f7a8
child 176 af6ec97d9189
equal deleted inserted replaced
102:ef2a444a7410 109:b3a1d9898418
   654 		{// No paging allowed so don't register the device.
   654 		{// No paging allowed so don't register the device.
   655 		return KErrNone;
   655 		return KErrNone;
   656 		}
   656 		}
   657 
   657 
   658 	// Store the device, blocking any other devices from installing.
   658 	// Store the device, blocking any other devices from installing.
       
   659 	// unless the device is a media extension device
       
   660 	if(aDevice->iType & DPagingDevice::EMediaExtension)
       
   661 		{
       
   662 		delete iSwapManager;
       
   663 		iSwapManager = NULL;
       
   664 		TAny* null = 0;
       
   665 		__e32_atomic_store_ord_ptr(&iDevice, null);
       
   666 		}
       
   667 
   659 	if (!NKern::CompareAndSwap((TAny*&)iDevice, (TAny*)NULL, (TAny*)aDevice))
   668 	if (!NKern::CompareAndSwap((TAny*&)iDevice, (TAny*)NULL, (TAny*)aDevice))
   660 		{// Data paging device already installed.
   669 		{// Data paging device already installed.
   661 		__KTRACE_OPT2(KPAGING,KBOOT,Kern::Printf("**** Attempt to install more than one data paging device !!!!!!!! ****"));
   670 		__KTRACE_OPT2(KPAGING,KBOOT,Kern::Printf("**** Attempt to install more than one data paging device !!!!!!!! ****"));
   662 		return KErrAlreadyExists;
   671 		return KErrAlreadyExists;
   663 		}
   672 		}