• Catalin Marinas's avatar
    Clear the exclusive monitor in the vector stub · 7ee81321
    Catalin Marinas authored
    The patch adds CLREX (or a dummy STREX) to the vector stub and removes
    it from the __switch_to function. This allows the atomic_set to be a
    simple STR instruction.
    
    Linux currently clears the exclusive monitor at every context switch,
    allowing threads to use plain STR for atomic store
    operations. However, this is not enough for atomic operations in
    signal handler. The patch fixes this case as well.
    
    Note that for the SMP case, plain STR clears the state of the global
    exclusive monitor. The effect of an STR on the local exclusive monitor
    is implementation defined and therefore a CLREX is needed at exception
    taking.
    Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    7ee81321
abort-ev6.S 1.1 KB