Changeset 23684b7 in mainline for arch/ppc32/include/atomic.h
- Timestamp:
- 2006-03-22T17:21:15Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d71007e
- Parents:
- 45fb65c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ppc32/include/atomic.h
r45fb65c r23684b7 31 31 32 32 #include <arch/types.h> 33 34 typedef struct { volatile __u32 count; } atomic_t; 33 #include <typedefs.h> 35 34 36 35 static inline void atomic_inc(atomic_t *val) … … 64 63 } 65 64 66 static inline __u32atomic_postinc(atomic_t *val)65 static inline long atomic_postinc(atomic_t *val) 67 66 { 68 67 atomic_inc(val); … … 70 69 } 71 70 72 static inline __u32atomic_postdec(atomic_t *val)71 static inline long atomic_postdec(atomic_t *val) 73 72 { 74 73 atomic_dec(val); … … 76 75 } 77 76 78 static inline __u32atomic_preinc(atomic_t *val)77 static inline long atomic_preinc(atomic_t *val) 79 78 { 80 79 atomic_inc(val); … … 82 81 } 83 82 84 static inline __u32atomic_predec(atomic_t *val)83 static inline long atomic_predec(atomic_t *val) 85 84 { 86 85 atomic_dec(val); … … 88 87 } 89 88 90 static inline void atomic_set(atomic_t *val, __u32 i)91 {92 val->count = i;93 }94 95 static inline __u32 atomic_get(atomic_t *val)96 {97 return val->count;98 }99 100 89 #endif
Note:
See TracChangeset
for help on using the changeset viewer.