Changes in kernel/arch/amd64/include/atomic.h [ba371e1:228666c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/atomic.h
rba371e1 r228666c 101 101 static inline atomic_count_t test_and_set(atomic_t *val) 102 102 { 103 atomic_count_t v = 1;103 atomic_count_t v; 104 104 105 105 asm volatile ( 106 "movq $1, %[v]\n" 106 107 "xchgq %[v], %[count]\n" 107 : [v] " +r" (v),108 : [v] "=r" (v), 108 109 [count] "+m" (val->count) 109 110 );
Note:
See TracChangeset
for help on using the changeset viewer.