Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(455)

Unified Diff: src/pkg/runtime/arm/atomic.c

Issue 4817058: code review 4817058: runtime: fix data race in findfunc() (Closed)
Patch Set: diff -r 9c32561a8704 https://go.googlecode.com/hg/ Created 13 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/runtime/amd64/asm.s ('k') | src/pkg/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+ }
+}
« no previous file with comments | « src/pkg/runtime/amd64/asm.s ('k') | src/pkg/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b