Rev 990 | Rev 1001 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 990 | Rev 1000 | ||
---|---|---|---|
Line 29... | Line 29... | ||
29 | #ifndef __ppc32_ATOMIC_H__ |
29 | #ifndef __ppc32_ATOMIC_H__ |
30 | #define __ppc32_ATOMIC_H__ |
30 | #define __ppc32_ATOMIC_H__ |
31 | 31 | ||
32 | #include <arch/types.h> |
32 | #include <arch/types.h> |
33 | 33 | ||
- | 34 | #define atomic_inc_pre(x) (atomic_inc(x) - 1) |
|
- | 35 | #define atomic_dec_pre(x) (atomic_dec(x) + 1) |
|
- | 36 | ||
- | 37 | #define atomic_inc_post(x) atomic_inc(x) |
|
- | 38 | #define atomic_dec_post(x) atomic_dec(x) |
|
- | 39 | ||
34 | typedef struct { volatile __u32 count; } atomic_t; |
40 | typedef struct { volatile __u32 count; } atomic_t; |
35 | 41 | ||
36 | static inline void atomic_inc(atomic_t *val) { |
42 | static inline void atomic_inc(atomic_t *val) { |
37 | __u32 tmp; |
43 | __u32 tmp; |
38 | 44 |