Disabled debug in ld-acess.so/loadlib
[tpg/acess2.git] / Kernel / arch / x86 / mm_virt.c
index b4fd222..6fa491b 100644 (file)
@@ -524,6 +524,19 @@ void MM_SetFlags(Uint VAddr, Uint Flags, Uint Mask)
                if( Flags & MM_PFLAG_KERNEL )   *ent &= ~PF_USER;
                else    *ent |= PF_USER;
        }
+       
+       // Copy-On-Write
+       if( Mask & MM_PFLAG_COW )
+       {
+               if( Flags & MM_PFLAG_COW ) {
+                       *ent &= ~PF_WRITE;
+                       *ent |= PF_COW;
+               }
+               else {
+                       *ent &= ~PF_COW;
+                       *ent |= PF_WRITE;
+               }
+       }
 }
 
 /**

UCC git Repository :: git.ucc.asn.au