.. | .. |
---|
12 | 12 | #include <asm/cmpxchg.h> |
---|
13 | 13 | #include <asm/barrier.h> |
---|
14 | 14 | |
---|
15 | | -#define ATOMIC_INIT(i) { (i) } |
---|
16 | 15 | #define ATOMIC64_INIT(i) { (i) } |
---|
17 | 16 | |
---|
18 | 17 | #define atomic_read(v) READ_ONCE((v)->counter) |
---|
.. | .. |
---|
23 | 22 | |
---|
24 | 23 | #define ATOMIC_OP(op) \ |
---|
25 | 24 | void atomic_##op(int, atomic_t *); \ |
---|
26 | | -void atomic64_##op(long, atomic64_t *); |
---|
| 25 | +void atomic64_##op(s64, atomic64_t *); |
---|
27 | 26 | |
---|
28 | 27 | #define ATOMIC_OP_RETURN(op) \ |
---|
29 | 28 | int atomic_##op##_return(int, atomic_t *); \ |
---|
30 | | -long atomic64_##op##_return(long, atomic64_t *); |
---|
| 29 | +s64 atomic64_##op##_return(s64, atomic64_t *); |
---|
31 | 30 | |
---|
32 | 31 | #define ATOMIC_FETCH_OP(op) \ |
---|
33 | 32 | int atomic_fetch_##op(int, atomic_t *); \ |
---|
34 | | -long atomic64_fetch_##op(long, atomic64_t *); |
---|
| 33 | +s64 atomic64_fetch_##op(s64, atomic64_t *); |
---|
35 | 34 | |
---|
36 | 35 | #define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_OP_RETURN(op) ATOMIC_FETCH_OP(op) |
---|
37 | 36 | |
---|
.. | .. |
---|
61 | 60 | ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) |
---|
62 | 61 | #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) |
---|
63 | 62 | |
---|
64 | | -long atomic64_dec_if_positive(atomic64_t *v); |
---|
| 63 | +s64 atomic64_dec_if_positive(atomic64_t *v); |
---|
65 | 64 | #define atomic64_dec_if_positive atomic64_dec_if_positive |
---|
66 | 65 | |
---|
67 | 66 | #endif /* !(__ARCH_SPARC64_ATOMIC__) */ |
---|