Changeset 9a2d6e1 in mainline
- Timestamp:
- 2006-03-15T18:58:26Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 649799a
- Parents:
- 9e1c942
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/include/atomic.h
r9e1c942 r9a2d6e1 60 60 } 61 61 62 static inline count_t atomic_ inc_pre(atomic_t *val)62 static inline count_t atomic_postinc(atomic_t *val) 63 63 { 64 64 count_t r; … … 73 73 } 74 74 75 static inline count_t atomic_ dec_pre(atomic_t *val)75 static inline count_t atomic_postdec(atomic_t *val) 76 76 { 77 77 count_t r; … … 86 86 } 87 87 88 #define atomic_ inc_post(val) (atomic_inc_pre(val)+1)89 #define atomic_ dec_post(val) (atomic_dec_pre(val)-1)88 #define atomic_preinc(val) (atomic_postinc(val)+1) 89 #define atomic_predec(val) (atomic_postdec(val)-1) 90 90 91 91 static inline __u64 test_and_set(atomic_t *val) { -
arch/ia32/include/atomic.h
r9e1c942 r9a2d6e1 60 60 } 61 61 62 static inline count_t atomic_ inc_pre(atomic_t *val)62 static inline count_t atomic_postinc(atomic_t *val) 63 63 { 64 64 count_t r; … … 73 73 } 74 74 75 static inline count_t atomic_ dec_pre(atomic_t *val)75 static inline count_t atomic_postdec(atomic_t *val) 76 76 { 77 77 count_t r; … … 86 86 } 87 87 88 #define atomic_ inc_post(val) (atomic_inc_pre(val)+1)89 #define atomic_ dec_post(val) (atomic_dec_pre(val)-1)88 #define atomic_preinc(val) (atomic_postinc(val)+1) 89 #define atomic_predec(val) (atomic_postdec(val)-1) 90 90 91 91 static inline __u32 test_and_set(atomic_t *val) { -
arch/ia64/include/atomic.h
r9e1c942 r9a2d6e1 39 39 * @param imm Value to add. 40 40 * 41 * @return Value afteraddition.41 * @return Value before addition. 42 42 */ 43 43 static inline count_t atomic_add(atomic_t *val, int imm) … … 63 63 static inline void atomic_dec(atomic_t *val) { atomic_add(val, -1); } 64 64 65 static inline count_t atomic_ inc_pre(atomic_t *val) { return atomic_add(val, 1); }66 static inline count_t atomic_ dec_pre(atomic_t *val) { return atomic_add(val, -1); }65 static inline count_t atomic_preinc(atomic_t *val) { return atomic_add(val, 1) + 1; } 66 static inline count_t atomic_predec(atomic_t *val) { return atomic_add(val, -1) - 1; } 67 67 68 static inline count_t atomic_ inc_post(atomic_t *val) { return atomic_add(val, 1) + 1; }69 static inline count_t atomic_ dec_post(atomic_t *val) { return atomic_add(val, -1) - 1; }68 static inline count_t atomic_postinc(atomic_t *val) { return atomic_add(val, 1); } 69 static inline count_t atomic_postdec(atomic_t *val) { return atomic_add(val, -1); } 70 70 71 71 #endif -
arch/mips32/include/atomic.h
r9e1c942 r9a2d6e1 35 35 #define atomic_dec(x) ((void) atomic_add(x, -1)) 36 36 37 #define atomic_ inc_pre(x) (atomic_add(x, 1) - 1)38 #define atomic_ dec_pre(x) (atomic_add(x, -1) + 1)37 #define atomic_postinc(x) (atomic_add(x, 1) - 1) 38 #define atomic_postdec(x) (atomic_add(x, -1) + 1) 39 39 40 #define atomic_inc_post(x) atomic_add(x, 1) 41 #define atomic_dec_post(x) atomic_add(x, -1) 42 40 #define atomic_preinc(x) atomic_add(x, 1) 41 #define atomic_predec(x) atomic_add(x, -1) 43 42 44 43 typedef struct { volatile __u32 count; } atomic_t; -
arch/ppc32/include/atomic.h
r9e1c942 r9a2d6e1 64 64 } 65 65 66 static inline __u32 atomic_ inc_pre(atomic_t *val)66 static inline __u32 atomic_postinc(atomic_t *val) 67 67 { 68 68 atomic_inc(val); … … 70 70 } 71 71 72 static inline __u32 atomic_ dec_pre(atomic_t *val)72 static inline __u32 atomic_postdec(atomic_t *val) 73 73 { 74 74 atomic_dec(val); … … 76 76 } 77 77 78 static inline __u32 atomic_ inc_post(atomic_t *val)78 static inline __u32 atomic_preinc(atomic_t *val) 79 79 { 80 80 atomic_inc(val); … … 82 82 } 83 83 84 static inline __u32 atomic_ dec_post(atomic_t *val)84 static inline __u32 atomic_predec(atomic_t *val) 85 85 { 86 86 atomic_dec(val); -
arch/sparc64/include/atomic.h
r9e1c942 r9a2d6e1 63 63 } 64 64 65 static inline count_t atomic_preinc(atomic_t *val) 66 { 67 return atomic_add(val, 1) + 1; 68 } 69 70 static inline count_t atomic_postinc(atomic_t *val) 71 { 72 return atomic_add(val, 1); 73 } 74 75 static inline count_t atomic_predec(atomic_t *val) 76 { 77 return atomic_add(val, -1) - 1; 78 } 79 80 static inline count_t atomic_postdec(atomic_t *val) 81 { 82 return atomic_add(val, 1); 83 } 84 65 85 static inline void atomic_inc(atomic_t *val) 66 86 { -
generic/src/syscall/syscall.c
r9e1c942 r9a2d6e1 125 125 static int check_call_limit(void) 126 126 { 127 if (atomic_ inc_post(&TASK->active_calls) > IPC_MAX_ASYNC_CALLS) {127 if (atomic_preinc(&TASK->active_calls) > IPC_MAX_ASYNC_CALLS) { 128 128 atomic_dec(&TASK->active_calls); 129 129 return -1; -
kernel.config
r9e1c942 r9a2d6e1 75 75 # Kernel test type 76 76 @ "" No test 77 @ "atomic/atomic1" Test of atomic operations. 77 78 @ "synch/rwlock1" Read write test 1 78 79 @ "synch/rwlock2" Read write test 2
Note:
See TracChangeset
for help on using the changeset viewer.