Added COW support to MM_SetFlags
if( Flags & MM_PFLAG_KERNEL ) *ent &= ~PF_USER;
else *ent |= PF_USER;
}
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;
+ }
+ }
- AcessOS 1 - Dynamic Loader\r
- By thePowersGang\r
-*/\r
+ * AcessOS 1 - Dynamic Loader\r
+ * By thePowersGang\r
+ */\r
#include "common.h"\r
#include "elf32.h"\r
#include "common.h"\r
#include "elf32.h"\r
int strcmp(char *s1, char *s2)
{
int strcmp(char *s1, char *s2)
{
- while(*s1 == *s2 && *s1 != 0) s1++,s2++;
+ while(*s1 && *s1 == *s2) s1++,s2++;
Uint IsFileLoaded(char *file)\r
{\r
int i;\r
Uint IsFileLoaded(char *file)\r
{\r
int i;\r
- DEBUGS("IsFileLoaded: (file='%s')\n", file);\r
+ DEBUGS("IsFileLoaded: (file='%s')", file);\r
for( i = 0; i < MAX_LOADED_LIBRARIES; i++ )\r
{\r
if(gLoadedLibraries[i].Base == 0) break; // Last entry has Base set to NULL\r
for( i = 0; i < MAX_LOADED_LIBRARIES; i++ )\r
{\r
if(gLoadedLibraries[i].Base == 0) break; // Last entry has Base set to NULL\r
+ DEBUGS(" strcmp('%s', '%s')", gLoadedLibraries[i].Name, file);\r
if(strcmp(gLoadedLibraries[i].Name, file) == 0) {\r
if(strcmp(gLoadedLibraries[i].Name, file) == 0) {\r
- DEBUGS("IsFileLoaded: Found %i (0x%x)\n", i, gLoadedLibraries[i].Base);\r
+ DEBUGS("IsFileLoaded: Found %i (0x%x)", i, gLoadedLibraries[i].Base);\r
return gLoadedLibraries[i].Base;\r
}\r
}\r
return gLoadedLibraries[i].Base;\r
}\r
}\r
- DEBUGS("IsFileLoaded: Not Found\n");\r
+ DEBUGS("IsFileLoaded: Not Found");\r