test.c revision 853733e772b2885d93fdf994dedc4a1b5dc1369e
1#include <stdio.h> 2 3void __tsan_init(); 4void __tsan_fini(); 5void __tsan_event(int typ, int tid, void *pc, void *addr, int info); 6 7int __tsan_symbolize(void *pc, char **img, char **rtn, char **file, int *l) { 8 return 0; 9} 10 11int main(void) { 12 __tsan_init(); 13 __tsan_event(1, 0, 0, &main, 0); // READ 14 __tsan_event(11, 1, 0, 0, 0); // THR_START 15 __tsan_event(11, 0, 0, &main, 0); // READ 16 __tsan_event(13, 1, 0, 0, 0); // THR_END 17 printf("OK\n"); 18 __tsan_fini(); 19 return 0; 20} 21