Changeset ba371e1 in mainline
- Timestamp:
- 2010-02-20T22:04:13Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- aa30c7f
- Parents:
- 7af8c0e
- Location:
- kernel/arch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/atomic.h
r7af8c0e rba371e1 101 101 static inline atomic_count_t test_and_set(atomic_t *val) 102 102 { 103 atomic_count_t v ;103 atomic_count_t v = 1; 104 104 105 105 asm volatile ( 106 "movq $1, %[v]\n"107 106 "xchgq %[v], %[count]\n" 108 : [v] " =r" (v),107 : [v] "+r" (v), 109 108 [count] "+m" (val->count) 110 109 ); -
kernel/arch/ia32/include/atomic.h
r7af8c0e rba371e1 101 101 static inline atomic_count_t test_and_set(atomic_t *val) 102 102 { 103 atomic_count_t v ;103 atomic_count_t v = 1; 104 104 105 105 asm volatile ( 106 "movl $1, %[v]\n"107 106 "xchgl %[v], %[count]\n" 108 : [v] " =r" (v),107 : [v] "+r" (v), 109 108 [count] "+m" (val->count) 110 109 );
Note:
See TracChangeset
for help on using the changeset viewer.