Skip to content

Commit

Permalink
[PATCH] x86-64: Fix constraints in atomic_add_return()
Browse files Browse the repository at this point in the history
Following i386 from Duncan Sands
Signed-off-by: Andi Kleen <ak@suse.de>
  • Loading branch information
Andi Kleen authored and Andi Kleen committed Dec 7, 2006
1 parent e4b522d commit 9dc452b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/asm-x86_64/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ static __inline__ int atomic_add_return(int i, atomic_t *v)
{
int __i = i;
__asm__ __volatile__(
LOCK_PREFIX "xaddl %0, %1;"
:"=r"(i)
:"m"(v->counter), "0"(i));
LOCK_PREFIX "xaddl %0, %1"
:"+r" (i), "+m" (v->counter)
: : "memory");
return i + __i;
}

Expand Down

0 comments on commit 9dc452b

Please sign in to comment.