Lines Matching defs:thr
135 ThreadState *thr = (ThreadState*)internal_alloc(MBlockThreadContex,
137 internal_memset(thr, 0, sizeof(*thr));
138 return thr;
144 ThreadState *thr = AllocGoroutine();
145 main_thr = *thrp = thr;
146 Initialize(thr);
147 *procp = thr->proc1;
153 ThreadState *thr = main_thr;
154 int res = Finalize(thr);
162 void __tsan_read(ThreadState *thr, void *addr, void *pc) {
163 MemoryRead(thr, (uptr)pc, (uptr)addr, kSizeLog1);
166 void __tsan_read_pc(ThreadState *thr, void *addr, uptr callpc, uptr pc) {
168 FuncEntry(thr, callpc);
169 MemoryRead(thr, (uptr)pc, (uptr)addr, kSizeLog1);
171 FuncExit(thr);
174 void __tsan_write(ThreadState *thr, void *addr, void *pc) {
175 MemoryWrite(thr, (uptr)pc, (uptr)addr, kSizeLog1);
178 void __tsan_write_pc(ThreadState *thr, void *addr, uptr callpc, uptr pc) {
180 FuncEntry(thr, callpc);
181 MemoryWrite(thr, (uptr)pc, (uptr)addr, kSizeLog1);
183 FuncExit(thr);
186 void __tsan_read_range(ThreadState *thr, void *addr, uptr size, uptr pc) {
187 MemoryAccessRange(thr, (uptr)pc, (uptr)addr, size, false);
190 void __tsan_write_range(ThreadState *thr, void *addr, uptr size, uptr pc) {
191 MemoryAccessRange(thr, (uptr)pc, (uptr)addr, size, true);
194 void __tsan_func_enter(ThreadState *thr, void *pc) {
195 FuncEntry(thr, (uptr)pc);
198 void __tsan_func_exit(ThreadState *thr) {
199 FuncExit(thr);
202 void __tsan_malloc(ThreadState *thr, uptr pc, uptr p, uptr sz) {
204 if (thr && pc)
205 ctx->metamap.AllocBlock(thr, pc, p, sz);
214 ThreadState *thr = AllocGoroutine();
215 *pthr = thr;
217 ThreadStart(thr, goid, 0);
220 void __tsan_go_end(ThreadState *thr) {
221 ThreadFinish(thr);
222 internal_free(thr);
233 void __tsan_acquire(ThreadState *thr, void *addr) {
234 Acquire(thr, 0, (uptr)addr);
237 void __tsan_release(ThreadState *thr, void *addr) {
238 ReleaseStore(thr, 0, (uptr)addr);
241 void __tsan_release_merge(ThreadState *thr, void *addr) {
242 Release(thr, 0, (uptr)addr);
245 void __tsan_finalizer_goroutine(ThreadState *thr) {
246 AcquireGlobal(thr, 0);
249 void __tsan_mutex_before_lock(ThreadState *thr, uptr addr, uptr write) {
252 void __tsan_mutex_after_lock(ThreadState *thr, uptr addr, uptr write) {
254 MutexLock(thr, 0, addr);
256 MutexReadLock(thr, 0, addr);
259 void __tsan_mutex_before_unlock(ThreadState *thr, uptr addr, uptr write) {
261 MutexUnlock(thr, 0, addr);
263 MutexReadUnlock(thr, 0, addr);
266 void __tsan_go_ignore_sync_begin(ThreadState *thr) {
267 ThreadIgnoreSyncBegin(thr, 0);
270 void __tsan_go_ignore_sync_end(ThreadState *thr) {
271 ThreadIgnoreSyncEnd(thr, 0);