Lines Matching refs:thr

143   auto *thr = (ThreadState *)Alloc(sizeof(ThreadState));  in AllocGoroutine()  local
144 internal_memset(thr, 0, sizeof(*thr)); in AllocGoroutine()
145 return thr; in AllocGoroutine()
151 ThreadState *thr = AllocGoroutine(); in __tsan_init() local
152 main_thr = *thrp = thr; in __tsan_init()
153 Initialize(thr); in __tsan_init()
154 *procp = thr->proc1; in __tsan_init()
160 ThreadState *thr = main_thr; in __tsan_fini() local
161 int res = Finalize(thr); in __tsan_fini()
169 void __tsan_read(ThreadState *thr, void *addr, void *pc) { in __tsan_read() argument
170 MemoryAccess(thr, (uptr)pc, (uptr)addr, 1, kAccessRead); in __tsan_read()
173 void __tsan_read_pc(ThreadState *thr, void *addr, uptr callpc, uptr pc) { in __tsan_read_pc() argument
175 FuncEntry(thr, callpc); in __tsan_read_pc()
176 MemoryAccess(thr, (uptr)pc, (uptr)addr, 1, kAccessRead); in __tsan_read_pc()
178 FuncExit(thr); in __tsan_read_pc()
181 void __tsan_write(ThreadState *thr, void *addr, void *pc) { in __tsan_write() argument
182 MemoryAccess(thr, (uptr)pc, (uptr)addr, 1, kAccessWrite); in __tsan_write()
185 void __tsan_write_pc(ThreadState *thr, void *addr, uptr callpc, uptr pc) { in __tsan_write_pc() argument
187 FuncEntry(thr, callpc); in __tsan_write_pc()
188 MemoryAccess(thr, (uptr)pc, (uptr)addr, 1, kAccessWrite); in __tsan_write_pc()
190 FuncExit(thr); in __tsan_write_pc()
193 void __tsan_read_range(ThreadState *thr, void *addr, uptr size, uptr pc) { in __tsan_read_range() argument
194 MemoryAccessRange(thr, (uptr)pc, (uptr)addr, size, false); in __tsan_read_range()
197 void __tsan_write_range(ThreadState *thr, void *addr, uptr size, uptr pc) { in __tsan_write_range() argument
198 MemoryAccessRange(thr, (uptr)pc, (uptr)addr, size, true); in __tsan_write_range()
201 void __tsan_func_enter(ThreadState *thr, void *pc) { in __tsan_func_enter() argument
202 FuncEntry(thr, (uptr)pc); in __tsan_func_enter()
205 void __tsan_func_exit(ThreadState *thr) { in __tsan_func_exit() argument
206 FuncExit(thr); in __tsan_func_exit()
209 void __tsan_malloc(ThreadState *thr, uptr pc, uptr p, uptr sz) { in __tsan_malloc() argument
211 if (thr && pc) in __tsan_malloc()
212 ctx->metamap.AllocBlock(thr, pc, p, sz); in __tsan_malloc()
213 MemoryResetRange(thr, pc, (uptr)p, sz); in __tsan_malloc()
221 ThreadState *thr = AllocGoroutine(); in __tsan_go_start() local
222 *pthr = thr; in __tsan_go_start()
224 ThreadStart(thr, goid, 0, ThreadType::Regular); in __tsan_go_start()
227 void __tsan_go_end(ThreadState *thr) { in __tsan_go_end() argument
228 ThreadFinish(thr); in __tsan_go_end()
229 Free(thr); in __tsan_go_end()
240 void __tsan_acquire(ThreadState *thr, void *addr) { in __tsan_acquire() argument
241 Acquire(thr, 0, (uptr)addr); in __tsan_acquire()
244 void __tsan_release_acquire(ThreadState *thr, void *addr) { in __tsan_release_acquire() argument
245 ReleaseStoreAcquire(thr, 0, (uptr)addr); in __tsan_release_acquire()
248 void __tsan_release(ThreadState *thr, void *addr) { in __tsan_release() argument
249 ReleaseStore(thr, 0, (uptr)addr); in __tsan_release()
252 void __tsan_release_merge(ThreadState *thr, void *addr) { in __tsan_release_merge() argument
253 Release(thr, 0, (uptr)addr); in __tsan_release_merge()
256 void __tsan_finalizer_goroutine(ThreadState *thr) { AcquireGlobal(thr); } in __tsan_finalizer_goroutine() argument
258 void __tsan_mutex_before_lock(ThreadState *thr, uptr addr, uptr write) { in __tsan_mutex_before_lock() argument
260 MutexPreLock(thr, 0, addr); in __tsan_mutex_before_lock()
262 MutexPreReadLock(thr, 0, addr); in __tsan_mutex_before_lock()
265 void __tsan_mutex_after_lock(ThreadState *thr, uptr addr, uptr write) { in __tsan_mutex_after_lock() argument
267 MutexPostLock(thr, 0, addr); in __tsan_mutex_after_lock()
269 MutexPostReadLock(thr, 0, addr); in __tsan_mutex_after_lock()
272 void __tsan_mutex_before_unlock(ThreadState *thr, uptr addr, uptr write) { in __tsan_mutex_before_unlock() argument
274 MutexUnlock(thr, 0, addr); in __tsan_mutex_before_unlock()
276 MutexReadUnlock(thr, 0, addr); in __tsan_mutex_before_unlock()
279 void __tsan_go_ignore_sync_begin(ThreadState *thr) { in __tsan_go_ignore_sync_begin() argument
280 ThreadIgnoreSyncBegin(thr, 0); in __tsan_go_ignore_sync_begin()
283 void __tsan_go_ignore_sync_end(ThreadState *thr) { ThreadIgnoreSyncEnd(thr); } in __tsan_go_ignore_sync_end() argument