• C
    tile: use READ_ONCE() in arch_spin_is_locked() · 627ae548
    Chris Metcalf 提交于
    This avoid potential issues if callers were to loop on these
    routines without some kind of memory barrier.  Currently there
    are no such users in-tree, but it seems better safe than sorry.
    
    Also, in the tilepro case we read "current" before "next",
    which gives us a slightly better guarantee that the lock was
    actually unlocked at least momentarily if we return claiming
    that it is not locked.  None of the callers actually rely on
    this behavior, as far as I know, however.
    Signed-off-by: NChris Metcalf <cmetcalf@ezchip.com>
    627ae548
spinlock_32.h 3.5 KB