From 70888b7ed586a3cabc8802af8a6e0901326f68ba Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Sun, 19 Jul 2015 16:55:47 +0000 Subject: [PATCH] Fix atomic_store_64, it should write the value passed in, not the value read by the load. Pointy Hat: andrew --- sys/arm/include/atomic-v6.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/include/atomic-v6.h b/sys/arm/include/atomic-v6.h index 01864a50e94f..06d8880192c7 100644 --- a/sys/arm/include/atomic-v6.h +++ b/sys/arm/include/atomic-v6.h @@ -558,7 +558,7 @@ atomic_store_64(volatile uint64_t *p, uint64_t val) __asm __volatile( "1: \n" " ldrexd %Q[tmp], %R[tmp], [%[ptr]] \n" - " strexd %[exf], %Q[tmp], %R[tmp], [%[ptr]] \n" + " strexd %[exf], %Q[val], %R[val], [%[ptr]] \n" " teq %[exf], #0 \n" " it ne \n" " bne 1b \n"