kernel/eka/memmodel/epoc/flexible/arm/xsched.cpp
branchRCL_3
changeset 43 c1f20ce4abcf
parent 0 a41df078684a
child 44 3e88ff8f41d5
--- a/kernel/eka/memmodel/epoc/flexible/arm/xsched.cpp	Thu Aug 19 11:14:22 2010 +0300
+++ b/kernel/eka/memmodel/epoc/flexible/arm/xsched.cpp	Tue Aug 31 16:34:26 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
 		{