Operating Systems/OS_Assg2_pipes-main/myexpos/xsm/registers.c
int registers_umode(const char *reg)
{
    int code = registers_get_register_code(reg);

    if (code < 0)
        return FALSE;

    if (code >= REG_PORT_LOW && code <= REG_PORT_HIGH)
        return FALSE;

    if (code >= REG_KERN_LOW && code <= REG_KERN_LOW)
        return FALSE;

    return TRUE;
}
/* Checks whether the given register can be used in USER mode */
Checks whether the given register can be used in USER mode
Checks whether the given register can be used in USER mode
int registers_umode(const char *reg)
{
    int code = registers_get_register_code(reg);
    if (code < 0)
        return FALSE;
    if (code >= REG_PORT_LOW && code <= REG_PORT_HIGH)
        return FALSE;
    if (code >= REG_KERN_LOW && code <= REG_KERN_LOW)
        return FALSE;
    return TRUE;
}
int registers_umode ( const char * reg ) { int code = registers_get_register_code ( reg ) ; if ( code < 0 ) return FALSE ; if ( code >= REG_PORT_LOW && code <= REG_PORT_HIGH ) return FALSE ; if ( code >= REG_KERN_LOW && code <= REG_KERN_LOW ) return FALSE ; return TRUE ; }
Checks whether the given register can be used in USER mode
Checks whether the given register can be used in USER mode