Changeset 89c57b6 in mainline for kernel/arch/mips32/include/atomic.h
- Timestamp:
- 2011-04-13T14:45:41Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 88634420
- Parents:
- cefb126 (diff), 17279ead (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/include/atomic.h
rcefb126 r89c57b6 36 36 #define KERN_mips32_ATOMIC_H_ 37 37 38 #include <trace.h> 39 38 40 #define atomic_inc(x) ((void) atomic_add(x, 1)) 39 41 #define atomic_dec(x) ((void) atomic_add(x, -1)) … … 53 55 * 54 56 */ 55 static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i) 57 NO_TRACE static inline atomic_count_t atomic_add(atomic_t *val, 58 atomic_count_t i) 56 59 { 57 60 atomic_count_t tmp; … … 76 79 } 77 80 78 static inline atomic_count_t test_and_set(atomic_t *val)81 NO_TRACE static inline atomic_count_t test_and_set(atomic_t *val) 79 82 { 80 83 atomic_count_t tmp; … … 88 91 " sc %0, %1\n" 89 92 " beqz %0, 1b\n" 93 " nop\n" 90 94 "2:\n" 91 95 : "=&r" (tmp), … … 98 102 } 99 103 100 static inline void atomic_lock_arch(atomic_t *val)104 NO_TRACE static inline void atomic_lock_arch(atomic_t *val) 101 105 { 102 106 do {
Note:
See TracChangeset
for help on using the changeset viewer.