Changeset a9ac978 in mainline for kernel/arch/sparc64/include/atomic.h
- Timestamp:
- 2006-09-27T20:11:34Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 00b38a3
- Parents:
- 86b31ba9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/atomic.h
r86b31ba9 ra9ac978 97 97 { 98 98 uint64_t v = 1; 99 volatile uintptr_t x = (uint64_t) &val->count; 99 100 100 __asm__ volatile ("casx %0, %2, %1\n" : "+m" (* val), "+r" (v) : "r" (0));101 __asm__ volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *) x)), "+r" (v) : "r" (0)); 101 102 102 103 return v; … … 107 108 uint64_t tmp1 = 1; 108 109 uint64_t tmp2; 110 111 volatile uintptr_t x = (uint64_t) &val->count; 109 112 110 113 __asm__ volatile ( … … 120 123 "nop\n" 121 124 "2:\n" 122 : "+m" (* val), "+r" (tmp1), "+r" (tmp2) : "r" (0)125 : "+m" (*((uint64_t *) x)), "+r" (tmp1), "+r" (tmp2) : "r" (0) 123 126 ); 124 127
Note:
See TracChangeset
for help on using the changeset viewer.