Changeset bc1089a in mainline
- Timestamp:
- 2005-09-02T17:57:11Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- da7d770
- Parents:
- 649d96b
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/include/atomic.h
r649d96b rbc1089a 31 31 32 32 33 /* Count_t is 32-bits on AMD-64 */ 34 static inline void atomic_inc(volatile count_t *val) { 33 static inline void atomic_inc(volatile int *val) { 35 34 #ifdef __SMP__ 36 35 __asm__ volatile ("lock incl (%0)\n" : : "r" (val)); … … 40 39 } 41 40 42 static inline void atomic_dec(volatile count_t *val) {41 static inline void atomic_dec(volatile int *val) { 43 42 #ifdef __SMP__ 44 43 __asm__ volatile ("lock decl (%0)\n" : : "r" (val)); -
arch/ia32/include/atomic.h
r649d96b rbc1089a 32 32 #include <arch/types.h> 33 33 34 static inline void atomic_inc(volatile count_t *val) {34 static inline void atomic_inc(volatile int *val) { 35 35 #ifdef __SMP__ 36 36 __asm__ volatile ("lock incl (%0)\n" : : "r" (val)); … … 40 40 } 41 41 42 static inline void atomic_dec(volatile count_t *val) {42 static inline void atomic_dec(volatile int *val) { 43 43 #ifdef __SMP__ 44 44 __asm__ volatile ("lock decl (%0)\n" : : "r" (val)); -
src/proc/scheduler.c
r649d96b rbc1089a 150 150 spinlock_unlock(&CPU->lock); 151 151 152 atomic_dec( &nrdy);152 atomic_dec((int *) &nrdy); 153 153 r->n--; 154 154 -
src/proc/thread.c
r649d96b rbc1089a 137 137 spinlock_unlock(&r->lock); 138 138 139 atomic_inc( &nrdy);139 atomic_inc((int *) &nrdy); 140 140 avg = nrdy / config.cpu_active; 141 141
Note:
See TracChangeset
for help on using the changeset viewer.