aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-02-26 06:22:41 -0500
committerH. Peter Anvin <hpa@zytor.com>2010-03-01 14:38:42 -0500
commitd7f6de1e9c4a12e11ba7186c70f0f40caa76f590 (patch)
tree0f9de2c0666d298a054f2a256da3029f97369d16 /lib
parent8f4f202b335144bf5be5c9e5b1bc9477ecdae958 (diff)
x86: Implement atomic[64]_dec_if_positive()
Add support for atomic_dec_if_positive(), and atomic64_dec_if_positive() for x86-64. atomic64_dec_if_positive() for x86-32 was already implemented in a previous patch. Signed-off-by: Luca Barbieri <luca@luca-barbieri.com> LKML-Reference: <1267183361-20775-2-git-send-email-luca@luca-barbieri.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/atomic64_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/atomic64_test.c b/lib/atomic64_test.c
index 0effcacbebda..58efdabb3845 100644
--- a/lib/atomic64_test.c
+++ b/lib/atomic64_test.c
@@ -112,7 +112,7 @@ static __init int test_atomic64(void)
112 r += one; 112 r += one;
113 BUG_ON(v.counter != r); 113 BUG_ON(v.counter != r);
114 114
115#if defined(CONFIG_X86_32) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(_ASM_GENERIC_ATOMIC64_H) 115#if defined(CONFIG_X86) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(_ASM_GENERIC_ATOMIC64_H)
116 INIT(onestwos); 116 INIT(onestwos);
117 BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1)); 117 BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1));
118 r -= one; 118 r -= one;