Changes in kernel/arch/arm32/include/atomic.h [228666c:4702bde] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/include/atomic.h
r228666c r4702bde 47 47 * 48 48 */ 49 static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i)49 static inline long atomic_add(atomic_t *val, int i) 50 50 { 51 long ret; 52 51 53 /* 52 54 * This implementation is for UP pre-ARMv6 systems where we do not have … … 55 57 ipl_t ipl = interrupts_disable(); 56 58 val->count += i; 57 atomic_count_tret = val->count;59 ret = val->count; 58 60 interrupts_restore(ipl); 59 61 … … 64 66 * 65 67 * @param val Variable to be incremented. 66 *67 68 */ 68 69 static inline void atomic_inc(atomic_t *val) … … 74 75 * 75 76 * @param val Variable to be decremented. 76 *77 77 */ 78 78 static inline void atomic_dec(atomic_t *val) { … … 84 84 * @param val Variable to be incremented. 85 85 * @return Value after incrementation. 86 *87 86 */ 88 static inline atomic_count_tatomic_preinc(atomic_t *val)87 static inline long atomic_preinc(atomic_t *val) 89 88 { 90 89 return atomic_add(val, 1); … … 95 94 * @param val Variable to be decremented. 96 95 * @return Value after decrementation. 97 *98 96 */ 99 static inline atomic_count_tatomic_predec(atomic_t *val)97 static inline long atomic_predec(atomic_t *val) 100 98 { 101 99 return atomic_add(val, -1); … … 106 104 * @param val Variable to be incremented. 107 105 * @return Value before incrementation. 108 *109 106 */ 110 static inline atomic_count_tatomic_postinc(atomic_t *val)107 static inline long atomic_postinc(atomic_t *val) 111 108 { 112 109 return atomic_add(val, 1) - 1; … … 117 114 * @param val Variable to be decremented. 118 115 * @return Value before decrementation. 119 *120 116 */ 121 static inline atomic_count_tatomic_postdec(atomic_t *val)117 static inline long atomic_postdec(atomic_t *val) 122 118 { 123 119 return atomic_add(val, -1) + 1;
Note:
See TracChangeset
for help on using the changeset viewer.