Changeset 05e2a7ad in mainline for arch/ia32/include/atomic.h
- Timestamp:
- 2005-12-07T13:32:31Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 839470f
- Parents:
- 253f8590
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/include/atomic.h
r253f8590 r05e2a7ad 54 54 atomic_t r; 55 55 __asm__ volatile ( 56 "movl $1, %0;"57 "lock xaddl %0, %1;"56 "movl $1, %0\n" 57 "lock xaddl %0, %1\n" 58 58 : "=r"(r), "=m" (*val) 59 59 ); … … 67 67 atomic_t r; 68 68 __asm__ volatile ( 69 "movl $-1, %0;"70 "lock xaddl %0, %1;"69 "movl $-1, %0\n" 70 "lock xaddl %0, %1\n" 71 71 : "=r"(r), "=m" (*val) 72 72 ); … … 76 76 #define atomic_inc_post(val) (atomic_inc_pre(val)+1) 77 77 #define atomic_dec_post(val) (atomic_dec_pre(val)-1) 78 79 80 78 81 79 static inline int test_and_set(volatile int *val) {
Note:
See TracChangeset
for help on using the changeset viewer.