diff options
| author | 2013-08-28 19:26:05 +0000 | |
|---|---|---|
| committer | 2013-08-28 19:26:05 +0000 | |
| commit | f8e653692bbf49e1dc9dba1232d180ab690a1f52 (patch) | |
| tree | 8446e41739df4ade25a10519b57d52c885e4a140 | |
| parent | Allow setlocale(LC_MESSAGES, ...); to succeed. This always returned an (diff) | |
| download | wireguard-openbsd-f8e653692bbf49e1dc9dba1232d180ab690a1f52.tar.xz wireguard-openbsd-f8e653692bbf49e1dc9dba1232d180ab690a1f52.zip | |
Following the ARM manuals and cookbooks, ldrex/strex don't have implicit
barriers. Therefore it is required to add a memory berrier, so that
it is ensured that all observers observed the change.
ok rapha@
| -rw-r--r-- | lib/librthread/arch/arm/_atomic_lock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/librthread/arch/arm/_atomic_lock.c b/lib/librthread/arch/arm/_atomic_lock.c index 14c25935b88..3c34df37981 100644 --- a/lib/librthread/arch/arm/_atomic_lock.c +++ b/lib/librthread/arch/arm/_atomic_lock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: _atomic_lock.c,v 1.5 2013/06/02 19:08:09 maja Exp $ */ +/* $OpenBSD: _atomic_lock.c,v 1.6 2013/08/28 19:26:05 patrick Exp $ */ /* * Copyright (c) 2004 Dale Rahn. All rights reserved. @@ -43,6 +43,7 @@ _atomic_lock(volatile _atomic_lock_t *lock) " strex %2, %3, [%1] \n" " cmp %2, #0 \n" " bne 1b \n" + " .long 0xf57ff05f \n" /* XXX: use dmb */ : "+r" (old), "+r" (lock), "+r" (scratch) : "r" (_ATOMIC_LOCK_LOCKED)); #else |
