Changeset a4be38d in mainline
- Timestamp:
- 2005-11-12T22:23:30Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 35667f8
- Parents:
- 30187eb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/include/atomic.h
r30187eb ra4be38d 36 36 static inline void atomic_inc(atomic_t *val) { 37 37 #ifdef CONFIG_SMP 38 __asm__ volatile ("lock incl %0\n" : " +m" (*val));38 __asm__ volatile ("lock incl %0\n" : "=m" (*val)); 39 39 #else 40 __asm__ volatile ("incl %0\n" : " +m" (*val));40 __asm__ volatile ("incl %0\n" : "=m" (*val)); 41 41 #endif /* CONFIG_SMP */ 42 42 } … … 44 44 static inline void atomic_dec(atomic_t *val) { 45 45 #ifdef CONFIG_SMP 46 __asm__ volatile ("lock decl %0\n" : " +m" (*val));46 __asm__ volatile ("lock decl %0\n" : "=m" (*val)); 47 47 #else 48 __asm__ volatile ("decl %0\n" : " +m" (*val));48 __asm__ volatile ("decl %0\n" : "=m" (*val)); 49 49 #endif /* CONFIG_SMP */ 50 50 } … … 56 56 "movl $1,%0;" 57 57 "lock xaddl %0,%1;" 58 : "=r"(r), " +m" (*val)58 : "=r"(r), "=m" (*val) 59 59 ); 60 60 return r; … … 69 69 "movl $-1,%0;" 70 70 "lock xaddl %0,%1;" 71 : "=r"(r), " +m" (*val)71 : "=r"(r), "=m" (*val) 72 72 ); 73 73 return r; … … 85 85 "movl $1, %0\n" 86 86 "xchgl %0, %1\n" 87 : "=r" (v)," +m" (*val)87 : "=r" (v),"=m" (*val) 88 88 ); 89 89
Note:
See TracChangeset
for help on using the changeset viewer.