X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Farch%2Fx86%2Fmm_virt.c;h=6fa491b8c4762ecc33f6fc27dedb7589bd1ead36;hb=05e8ae6b8fd960b2d9d3dafb34263fe7bd1cb90b;hp=b4fd2225a3d90616c3c7d4883efb8f137ff4a0a7;hpb=ed7804028b2b11be0703677aa8eb643a811e5027;p=tpg%2Facess2.git diff --git a/Kernel/arch/x86/mm_virt.c b/Kernel/arch/x86/mm_virt.c index b4fd2225..6fa491b8 100644 --- a/Kernel/arch/x86/mm_virt.c +++ b/Kernel/arch/x86/mm_virt.c @@ -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; + } + } } /**