Lines Matching defs:thr
78 ThreadState *thr = (ThreadState*)internal_alloc(MBlockThreadContex,
80 internal_memset(thr, 0, sizeof(*thr));
81 return thr;
86 ThreadState *thr = AllocGoroutine();
87 main_thr = *thrp = thr;
88 Initialize(thr);
94 ThreadState *thr = main_thr;
95 int res = Finalize(thr);
103 void __tsan_read(ThreadState *thr, void *addr, void *pc) {
104 MemoryRead(thr, (uptr)pc, (uptr)addr, kSizeLog1);
107 void __tsan_read_pc(ThreadState *thr, void *addr, uptr callpc, uptr pc) {
109 FuncEntry(thr, callpc);
110 MemoryRead(thr, (uptr)pc, (uptr)addr, kSizeLog1);
112 FuncExit(thr);
115 void __tsan_write(ThreadState *thr, void *addr, void *pc) {
116 MemoryWrite(thr, (uptr)pc, (uptr)addr, kSizeLog1);
119 void __tsan_write_pc(ThreadState *thr, void *addr, uptr callpc, uptr pc) {
121 FuncEntry(thr, callpc);
122 MemoryWrite(thr, (uptr)pc, (uptr)addr, kSizeLog1);
124 FuncExit(thr);
127 void __tsan_read_range(ThreadState *thr, void *addr, uptr size, uptr pc) {
128 MemoryAccessRange(thr, (uptr)pc, (uptr)addr, size, false);
131 void __tsan_write_range(ThreadState *thr, void *addr, uptr size, uptr pc) {
132 MemoryAccessRange(thr, (uptr)pc, (uptr)addr, size, true);
135 void __tsan_func_enter(ThreadState *thr, void *pc) {
136 FuncEntry(thr, (uptr)pc);
139 void __tsan_func_exit(ThreadState *thr) {
140 FuncExit(thr);
150 ThreadState *thr = AllocGoroutine();
151 *pthr = thr;
153 ThreadStart(thr, goid, 0);
156 void __tsan_go_end(ThreadState *thr) {
157 ThreadFinish(thr);
158 internal_free(thr);
161 void __tsan_acquire(ThreadState *thr, void *addr) {
162 Acquire(thr, 0, (uptr)addr);
165 void __tsan_release(ThreadState *thr, void *addr) {
166 ReleaseStore(thr, 0, (uptr)addr);
169 void __tsan_release_merge(ThreadState *thr, void *addr) {
170 Release(thr, 0, (uptr)addr);
173 void __tsan_finalizer_goroutine(ThreadState *thr) {
174 AcquireGlobal(thr, 0);
177 void __tsan_mutex_before_lock(ThreadState *thr, uptr addr, uptr write) {
180 void __tsan_mutex_after_lock(ThreadState *thr, uptr addr, uptr write) {
182 MutexLock(thr, 0, addr);
184 MutexReadLock(thr, 0, addr);
187 void __tsan_mutex_before_unlock(ThreadState *thr, uptr addr, uptr write) {
189 MutexUnlock(thr, 0, addr);
191 MutexReadUnlock(thr, 0, addr);
194 void __tsan_go_ignore_sync_begin(ThreadState *thr) {
195 ThreadIgnoreSyncBegin(thr, 0);
198 void __tsan_go_ignore_sync_end(ThreadState *thr) {
199 ThreadIgnoreSyncEnd(thr, 0);