--- a/include/asm-generic/atomic.h 2006-01-28 02:59:49.000000000 +0100 +++ b/include/asm-generic/atomic.h 2006-01-28 02:57:36.000000000 +0100 @@ -66,6 +66,18 @@ atomic64_sub(i, v); } +static inline long atomic_long_xchg(atomic_long_t *l, long val) +{ + atomic64_t *v = (atomic64_t *)l; + return atomic64_xchg(v, val); +} + +static inline long atomic_long_cmpxchg(atomic_long_t *l, long old, long new) +{ + atomic64_t *v = (atomic64_t *)l; + return atomic64_cmpxchg(v, old, new); +} + #else typedef atomic_t atomic_long_t; @@ -113,5 +125,17 @@ atomic_sub(i, v); } +static inline long atomic_long_xchg(atomic_long_t *l, long val) +{ + atomic_t *v = (atomic_t *)l; + return atomic_xchg(v, val); +} + +static inline long atomic_long_cmpxchg(atomic_long_t *l, long old, long new) +{ + atomic_t *v = (atomic_t *)l; + return atomic_cmpxchg(v, old, new); +} + #endif #endif