kernel/eka/memmodel/epoc/flexible/arm/xsched.cpp
changeset 109 b3a1d9898418
parent 0 a41df078684a
child 257 3e88ff8f41d5
--- a/kernel/eka/memmodel/epoc/flexible/arm/xsched.cpp	Mon May 03 13:47:38 2010 +0300
+++ b/kernel/eka/memmodel/epoc/flexible/arm/xsched.cpp	Fri May 14 17:13:29 2010 +0300
@@ -14,6 +14,7 @@
 //
 
 #include "arm_mem.h"
+#include "mpager.h"
 
 #define iMState		iWaitLink.iSpare1
 
@@ -30,6 +31,18 @@
 	DThread* thread = TheCurrentThread;
 	TRequestStatus* status = aStatus;
 	aStatus = NULL;
+
+#ifdef _DEBUG
+	if (KDebugNum(KFORCEKUPAGEFAULTS))
+		{
+		NKern::UnlockSystem();
+		TInt r = ThePager.FlushRegion((DMemModelProcess*)thread->iOwningProcess,
+									  (TLinAddr)status, sizeof(TRequestStatus));
+		(void)r; // ignore errors
+		NKern::LockSystem();
+		}
+#endif
+	
 	TInt pagingFault;
 	do
 		{