user/lib/libsystem/src/sys/vm.c
/**
 * Converts syscall flags back into our flag values.
 */
Converts syscall flags back into our flag values.
Converts syscall flags back into our flag values .
static uintptr_t ConvertSyscallFlags(const uintptr_t inFlags) {
    uintptr_t temp = 0;
    if(inFlags & (1 << 7)) {
        temp |= VM_REGION_ANON;
    }
    if(inFlags & (1 << 10)) {
        temp |= VM_REGION_READ;
    }
    if(inFlags & (1 << 11)) {
        temp |= VM_REGION_WRITE;
    }
    if(inFlags & (1 << 12)) {
        temp |= VM_REGION_EXEC;
    }
    if(inFlags & (1 << 13)) {
        temp |= VM_REGION_MMIO;
    }
    if(inFlags & (1 << 14)) {
        temp |= VM_REGION_WRITETHRU;
    }
    return temp;
}
static uintptr_t ConvertSyscallFlags ( const uintptr_t inFlags ) { uintptr_t temp = 0 ; if ( inFlags & ( 1 << 7 ) ) { temp |= VM_REGION_ANON ; } if ( inFlags & ( 1 << 10 ) ) { temp |= VM_REGION_READ ; } if ( inFlags & ( 1 << 11 ) ) { temp |= VM_REGION_WRITE ; } if ( inFlags & ( 1 << 12 ) ) { temp |= VM_REGION_EXEC ; } if ( inFlags & ( 1 << 13 ) ) { temp |= VM_REGION_MMIO ; } if ( inFlags & ( 1 << 14 ) ) { temp |= VM_REGION_WRITETHRU ; } return temp ; }
Converts syscall flags back into our flag values.
Converts syscall flags back into our flag values .