core/linux/os.c
/* translate native flags to platform independent protection bits */
translate native flags to platform independent protection bits
translate native flags to platform independent protection bits
static inline uint
osprot_to_memprot(uint prot)
{
    uint mem_prot = 0;
    if (TEST(PROT_EXEC, prot))
        mem_prot |= MEMPROT_EXEC;
    if (TEST(PROT_READ, prot))
        mem_prot |= MEMPROT_READ;
    if (TEST(PROT_WRITE, prot))
        mem_prot |= MEMPROT_WRITE;
    return mem_prot;
}
static inline uint osprot_to_memprot ( uint prot ) { uint mem_prot = 0 ; if ( TEST ( PROT_EXEC , prot ) ) mem_prot |= MEMPROT_EXEC ; if ( TEST ( PROT_READ , prot ) ) mem_prot |= MEMPROT_READ ; if ( TEST ( PROT_WRITE , prot ) ) mem_prot |= MEMPROT_WRITE ; return mem_prot ; }
translate native flags to platform independent protection bits
translate native flags to platform independent protection bits