Changeset bf29fe5 in mainline
- Timestamp:
- 2008-08-31T09:08:53Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 43b7b35
- Parents:
- 42a0607
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/atomic.h
r42a0607 rbf29fe5 38 38 #include <arch/barrier.h> 39 39 #include <arch/types.h> 40 #include <preemption.h> 40 41 41 42 /** Atomic add operation. … … 57 58 a = *((uint64_t *) x); 58 59 b = a + i; 59 asm volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *)x)), "+r" (b) : "r" (a)); 60 asm volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *)x)), 61 "+r" (b) : "r" (a)); 60 62 } while (a != b); 61 63 … … 98 100 volatile uintptr_t x = (uint64_t) &val->count; 99 101 100 asm volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *) x)), "+r" (v) : "r" (0)); 102 asm volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *) x)), 103 "+r" (v) : "r" (0)); 101 104 102 105 return v; … … 109 112 110 113 volatile uintptr_t x = (uint64_t) &val->count; 114 115 preemption_disable(); 111 116 112 117 asm volatile (
Note:
See TracChangeset
for help on using the changeset viewer.