|
@@ -1,7 +1,7 @@
|
|
/* atomic.h: Thankfully the V9 is at least reasonable for this
|
|
/* atomic.h: Thankfully the V9 is at least reasonable for this
|
|
* stuff.
|
|
* stuff.
|
|
*
|
|
*
|
|
- * Copyright (C) 1996, 1997, 2000 David S. Miller (davem@redhat.com)
|
|
|
|
|
|
+ * Copyright (C) 1996, 1997, 2000, 2012 David S. Miller (davem@redhat.com)
|
|
*/
|
|
*/
|
|
|
|
|
|
#ifndef __ARCH_SPARC64_ATOMIC__
|
|
#ifndef __ARCH_SPARC64_ATOMIC__
|
|
@@ -106,6 +106,8 @@ static inline long atomic64_add_unless(atomic64_t *v, long a, long u)
|
|
|
|
|
|
#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
|
|
#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
|
|
|
|
|
|
|
|
+extern long atomic64_dec_if_positive(atomic64_t *v);
|
|
|
|
+
|
|
/* Atomic operations are already serializing */
|
|
/* Atomic operations are already serializing */
|
|
#define smp_mb__before_atomic_dec() barrier()
|
|
#define smp_mb__before_atomic_dec() barrier()
|
|
#define smp_mb__after_atomic_dec() barrier()
|
|
#define smp_mb__after_atomic_dec() barrier()
|