diff options
Diffstat (limited to 'arch/m68k/include/asm/atomic.h')
-rw-r--r-- | arch/m68k/include/asm/atomic.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/m68k/include/asm/atomic.h b/arch/m68k/include/asm/atomic.h index 65c6be6c8180..4eba796c00d4 100644 --- a/arch/m68k/include/asm/atomic.h +++ b/arch/m68k/include/asm/atomic.h | |||
@@ -55,6 +55,16 @@ static inline int atomic_dec_and_test(atomic_t *v) | |||
55 | return c != 0; | 55 | return c != 0; |
56 | } | 56 | } |
57 | 57 | ||
58 | static inline int atomic_dec_and_test_lt(atomic_t *v) | ||
59 | { | ||
60 | char c; | ||
61 | __asm__ __volatile__( | ||
62 | "subql #1,%1; slt %0" | ||
63 | : "=d" (c), "=m" (*v) | ||
64 | : "m" (*v)); | ||
65 | return c != 0; | ||
66 | } | ||
67 | |||
58 | static inline int atomic_inc_and_test(atomic_t *v) | 68 | static inline int atomic_inc_and_test(atomic_t *v) |
59 | { | 69 | { |
60 | char c; | 70 | char c; |