Tidy up memory barriers.
Change-Id: I937ea93e6df1835ecfe2d4bb7d84c24fe7fc097b
diff --git a/runtime/arch/arm/quick_entrypoints_arm.S b/runtime/arch/arm/quick_entrypoints_arm.S
index 61be14b..34de93f 100644
--- a/runtime/arch/arm/quick_entrypoints_arm.S
+++ b/runtime/arch/arm/quick_entrypoints_arm.S
@@ -359,6 +359,7 @@
@ unlocked case - r2 holds thread id with count of 0
strex r3, r2, [r0, #LOCK_WORD_OFFSET]
cbnz r3, strex_fail @ store failed, retry
+ dmb ish @ full (LoadLoad) memory barrier
bx lr
strex_fail:
b retry_lock @ unlikely forward branch, need to reload and recheck r1/r2
@@ -402,6 +403,7 @@
bpl recursive_thin_unlock
@ transition to unlocked, r3 holds 0
str r3, [r0, #LOCK_WORD_OFFSET]
+ dmb ish @ full (StoreLoad) memory barrier
bx lr
recursive_thin_unlock:
sub r1, r1, #65536