Index: src/pkg/runtime/arm/atomic.c |
=================================================================== |
--- a/src/pkg/runtime/arm/atomic.c |
+++ b/src/pkg/runtime/arm/atomic.c |
@@ -68,3 +68,16 @@ |
return; |
} |
} |
+ |
+#pragma textflag 7 |
+void |
+runtime·atomicstore(uint32 volatile* addr, uint32 v) |
+{ |
+ uint32 old; |
+ |
+ for(;;) { |
+ old = *addr; |
+ if(runtime·cas(addr, old, v)) |
+ return; |
+ } |
+} |