diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2012-07-16 16:01:08 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2012-07-16 16:01:08 +0000 |
commit | 9270eaf1f24357764dda6cc70196a3fb03bfbb2b (patch) | |
tree | 71d947c230246467bbe8c03949b0ad906e58d0a9 /compiler-rt/lib/tsan/go/test.c | |
parent | 1206a911552b65e26491c0ed59cc1d455f3a4048 (diff) | |
download | bcm5719-llvm-9270eaf1f24357764dda6cc70196a3fb03bfbb2b.tar.gz bcm5719-llvm-9270eaf1f24357764dda6cc70196a3fb03bfbb2b.zip |
tsan: Go runtime: support goroutine end event
llvm-svn: 160282
Diffstat (limited to 'compiler-rt/lib/tsan/go/test.c')
-rw-r--r-- | compiler-rt/lib/tsan/go/test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler-rt/lib/tsan/go/test.c b/compiler-rt/lib/tsan/go/test.c index c27a94adf58..c6c21a165bd 100644 --- a/compiler-rt/lib/tsan/go/test.c +++ b/compiler-rt/lib/tsan/go/test.c @@ -2,6 +2,7 @@ void __tsan_init(); void __tsan_fini(); +void __tsan_event(int typ, int tid, void *pc, void *addr, int info); int goCallbackCommentPc(void *pc, char **img, char **rtn, char **file, int *l) { return 0; @@ -9,6 +10,10 @@ int goCallbackCommentPc(void *pc, char **img, char **rtn, char **file, int *l) { int main(void) { __tsan_init(); + __tsan_event(1, 0, 0, &main, 0); // READ + __tsan_event(11, 1, 0, 0, 0); // THR_START + __tsan_event(11, 0, 0, &main, 0); // READ + __tsan_event(13, 1, 0, 0, 0); // THR_END printf("OK\n"); __tsan_fini(); return 0; |