Changeset b03a666 in mainline
- Timestamp:
- 2010-02-20T20:35:45Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7af8c0e, c2efbb4
- Parents:
- 228666c
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/abs32le/include/atomic.h
r228666c rb03a666 54 54 } 55 55 56 static inline longatomic_postinc(atomic_t *val)56 static inline atomic_count_t atomic_postinc(atomic_t *val) 57 57 { 58 58 /* On real hardware both the storing of the previous … … 60 60 atomic action. */ 61 61 62 longprev = val->count;62 atomic_count_t prev = val->count; 63 63 64 64 val->count++; … … 66 66 } 67 67 68 static inline longatomic_postdec(atomic_t *val)68 static inline atomic_count_t atomic_postdec(atomic_t *val) 69 69 { 70 70 /* On real hardware both the storing of the previous … … 72 72 atomic action. */ 73 73 74 longprev = val->count;74 atomic_count_t prev = val->count; 75 75 76 76 val->count--; … … 81 81 #define atomic_predec(val) (atomic_postdec(val) - 1) 82 82 83 static inline uint32_t test_and_set(atomic_t *val)83 static inline atomic_count_t test_and_set(atomic_t *val) 84 84 { 85 uint32_t prev = val->count;85 atomic_count_t prev = val->count; 86 86 val->count = 1; 87 87 return prev; -
kernel/arch/abs32le/include/types.h
r228666c rb03a666 55 55 typedef uint32_t unative_t; 56 56 typedef int32_t native_t; 57 typedef uint32_t atomic_count_t; 57 58 58 59 typedef struct { -
uspace/lib/libc/arch/abs32le/include/atomic.h
r228666c rb03a666 43 43 #include <atomicdflt.h> 44 44 45 static inline bool cas(atomic_t *val, long ov, longnv)45 static inline bool cas(atomic_t *val, atomic_count_t ov, atomic_count_t nv) 46 46 { 47 47 if (val->count == ov) { … … 67 67 } 68 68 69 static inline longatomic_postinc(atomic_t *val)69 static inline atomic_count_t atomic_postinc(atomic_t *val) 70 70 { 71 71 /* On real hardware both the storing of the previous … … 73 73 atomic action. */ 74 74 75 longprev = val->count;75 atomic_count_t prev = val->count; 76 76 77 77 val->count++; … … 79 79 } 80 80 81 static inline longatomic_postdec(atomic_t *val)81 static inline atomic_count_t atomic_postdec(atomic_t *val) 82 82 { 83 83 /* On real hardware both the storing of the previous … … 85 85 atomic action. */ 86 86 87 longprev = val->count;87 atomic_count_t prev = val->count; 88 88 89 89 val->count--; -
uspace/lib/libc/arch/abs32le/include/types.h
r228666c rb03a666 54 54 55 55 typedef uint32_t uintptr_t; 56 typedef uint32_t atomic_count_t; 57 typedef int32_t atomic_signed_t; 56 58 57 59 #endif
Note:
See TracChangeset
for help on using the changeset viewer.