From 9270eaf1f24357764dda6cc70196a3fb03bfbb2b Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 16 Jul 2012 16:01:08 +0000 Subject: tsan: Go runtime: support goroutine end event llvm-svn: 160282 --- compiler-rt/lib/tsan/go/test.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler-rt/lib/tsan/go/test.c') 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; -- cgit v1.2.3