[llvm-commits] [compiler-rt] r167580 - /compiler-rt/trunk/lib/tsan/go/tsan_go.cc
Dmitry Vyukov
dvyukov at google.com
Thu Nov 8 05:38:45 PST 2012
Author: dvyukov
Date: Thu Nov 8 07:38:45 2012
New Revision: 167580
URL: http://llvm.org/viewvc/llvm-project?rev=167580&view=rev
Log:
tsan: add range access functions for Go
Modified:
compiler-rt/trunk/lib/tsan/go/tsan_go.cc
Modified: compiler-rt/trunk/lib/tsan/go/tsan_go.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/go/tsan_go.cc?rev=167580&r1=167579&r2=167580&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/go/tsan_go.cc (original)
+++ compiler-rt/trunk/lib/tsan/go/tsan_go.cc Thu Nov 8 07:38:45 2012
@@ -122,6 +122,18 @@
MemoryAccess(thr, (uptr)pc, (uptr)addr, 0, true);
}
+void __tsan_read_range(int goid, void *addr, uptr size, uptr step, void *pc) {
+ ThreadState *thr = goroutines[goid];
+ for (uptr i = 0; i < size; i += step)
+ MemoryAccess(thr, (uptr)pc, (uptr)addr + i, 0, false);
+}
+
+void __tsan_write_range(int goid, void *addr, uptr size, uptr step, void *pc) {
+ ThreadState *thr = goroutines[goid];
+ for (uptr i = 0; i < size; i += step)
+ MemoryAccess(thr, (uptr)pc, (uptr)addr + i, 0, true);
+}
+
void __tsan_func_enter(int goid, void *pc) {
ThreadState *thr = goroutines[goid];
FuncEntry(thr, (uptr)pc);
More information about the llvm-commits
mailing list