Changes in kernel/arch/sparc64/include/atomic.h [40239b9:7a0359b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/atomic.h
r40239b9 r7a0359b 39 39 #include <typedefs.h> 40 40 #include <preemption.h> 41 #include <trace.h> 41 42 42 43 /** Atomic add operation. … … 50 51 * 51 52 */ 52 static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i) 53 NO_TRACE static inline atomic_count_t atomic_add(atomic_t *val, 54 atomic_count_t i) 53 55 { 54 56 atomic_count_t a; … … 72 74 } 73 75 74 static inline atomic_count_t atomic_preinc(atomic_t *val)76 NO_TRACE static inline atomic_count_t atomic_preinc(atomic_t *val) 75 77 { 76 78 return atomic_add(val, 1) + 1; 77 79 } 78 80 79 static inline atomic_count_t atomic_postinc(atomic_t *val)81 NO_TRACE static inline atomic_count_t atomic_postinc(atomic_t *val) 80 82 { 81 83 return atomic_add(val, 1); 82 84 } 83 85 84 static inline atomic_count_t atomic_predec(atomic_t *val)86 NO_TRACE static inline atomic_count_t atomic_predec(atomic_t *val) 85 87 { 86 88 return atomic_add(val, -1) - 1; 87 89 } 88 90 89 static inline atomic_count_t atomic_postdec(atomic_t *val)91 NO_TRACE static inline atomic_count_t atomic_postdec(atomic_t *val) 90 92 { 91 93 return atomic_add(val, -1); 92 94 } 93 95 94 static inline void atomic_inc(atomic_t *val)96 NO_TRACE static inline void atomic_inc(atomic_t *val) 95 97 { 96 98 (void) atomic_add(val, 1); 97 99 } 98 100 99 static inline void atomic_dec(atomic_t *val)101 NO_TRACE static inline void atomic_dec(atomic_t *val) 100 102 { 101 103 (void) atomic_add(val, -1); 102 104 } 103 105 104 static inline atomic_count_t test_and_set(atomic_t *val)106 NO_TRACE static inline atomic_count_t test_and_set(atomic_t *val) 105 107 { 106 108 atomic_count_t v = 1; … … 117 119 } 118 120 119 static inline void atomic_lock_arch(atomic_t *val)121 NO_TRACE static inline void atomic_lock_arch(atomic_t *val) 120 122 { 121 123 atomic_count_t tmp1 = 1;
Note:
See TracChangeset
for help on using the changeset viewer.