• R
    add support for sh2 interrupt-masking-based atomics to sh port · f9d84554
    Rich Felker 提交于
    the sh2 target is being considered an ISA subset of sh3/sh4, in the
    sense that binaries built for sh2 are intended to be usable on later
    cpu models/kernels with mmu support. so rather than hard-coding
    sh2-specific atomics, the runtime atomic selection mechanisms that was
    already in place has been extended to add sh2 atomics.
    
    at this time, the sh2 atomics are not SMP-compatible; since the ISA
    lacks actual atomic operations, the new code instead masks interrupts
    for the duration of the atomic operation, producing an atomic result
    on single-core. this is only possible because the kernel/hardware does
    not impose protections against userspace doing so. additional changes
    will be needed to support future SMP systems.
    
    care has been taken to avoid producing significant additional code
    size in the case where it's known at compile-time that the target is
    not sh2 and does not need sh2-specific code.
    f9d84554
__set_thread_area.s 0 字节