Changeset 7038f55 in mainline for kernel/arch/ia64/include/atomic.h
- Timestamp:
- 2009-07-24T16:04:52Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6ac14a70
- Parents:
- 1641eb0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/include/atomic.h
r1641eb0 r7038f55 53 53 } 54 54 55 56 static inline uint64_t test_and_set(atomic_t *val){55 static inline uint64_t test_and_set(atomic_t *val) 56 { 57 57 uint64_t v; 58 58 59 59 asm volatile ( 60 "movl %0 = 0x 01;;\n"60 "movl %0 = 0x1;;\n" 61 61 "xchg8 %0 = %1, %0;;\n" 62 62 : "=r" (v), "+m" (val->count) … … 66 66 } 67 67 68 static inline void atomic_lock_arch(atomic_t *val) 69 { 70 do { 71 while (val->count) 72 ; 73 } while (test_and_set(val)); 74 } 68 75 69 76 static inline void atomic_inc(atomic_t *val)
Note:
See TracChangeset
for help on using the changeset viewer.