• Paul Burton's avatar
    MIPS: bitops: Implement test_and_set_bit() in terms of _lock variant · 6bbe043b
    Paul Burton authored
    The only difference between test_and_set_bit() & test_and_set_bit_lock()
    is memory ordering barrier semantics - the former provides a full
    barrier whilst the latter only provides acquire semantics.
    
    We can therefore implement test_and_set_bit() in terms of
    test_and_set_bit_lock() with the addition of the extra memory barrier.
    Do this in order to avoid duplicating logic.
    Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
    Cc: linux-mips@vger.kernel.org
    Cc: Huacai Chen <chenhc@lemote.com>
    Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
    Cc: linux-kernel@vger.kernel.org
    6bbe043b
bitops.h 14.2 KB