Rev 1024 | Rev 1104 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1024 | Rev 1082 | ||
---|---|---|---|
Line 77... | Line 77... | ||
77 | return atomic_add(val, -1) - 1; |
77 | return atomic_add(val, -1) - 1; |
78 | } |
78 | } |
79 | 79 | ||
80 | static inline count_t atomic_postdec(atomic_t *val) |
80 | static inline count_t atomic_postdec(atomic_t *val) |
81 | { |
81 | { |
82 | return atomic_add(val, 1); |
82 | return atomic_add(val, -1); |
83 | } |
83 | } |
84 | 84 | ||
85 | static inline void atomic_inc(atomic_t *val) |
85 | static inline void atomic_inc(atomic_t *val) |
86 | { |
86 | { |
87 | (void) atomic_add(val, 1); |
87 | (void) atomic_add(val, 1); |