]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
x86, atomic: Fix 32-bit version of atomic_write64().
authorKeir Fraser <keir@xen.org>
Fri, 17 Dec 2010 14:17:31 +0000 (14:17 +0000)
committerKeir Fraser <keir@xen.org>
Fri, 17 Dec 2010 14:17:31 +0000 (14:17 +0000)
Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22572:e3fd86244491
xen-unstable date:        Fri Dec 17 14:16:41 2010 +0000

xen/include/asm-x86/atomic.h

index 3578c33568faf1df29d65ee915bfa61385fc75fb..345880fd12b4f97219fd24c3ca072175f498d327 100644 (file)
@@ -42,7 +42,7 @@ static inline uint64_t atomic_read64(const volatile uint64_t *addr)
 static inline void atomic_write64(volatile uint64_t *addr, uint64_t val)
 {
     uint64_t old = *addr, new, *__addr = (uint64_t *)addr;
-    while ( (old = __cmpxchg8b(__addr, old, val)) != old )
+    while ( (new = __cmpxchg8b(__addr, old, val)) != old )
         old = new;
 }
 #endif