/freebsd-current/contrib/llvm-project/compiler-rt/lib/tsan/rtl/ |
H A D | tsan_fd.h | 41 void FdAcquire(ThreadState *thr, uptr pc, int fd); 42 void FdRelease(ThreadState *thr, uptr pc, int fd); 43 void FdAccess(ThreadState *thr, uptr pc, int fd); 44 void FdClose(ThreadState *thr, uptr pc, int fd, bool write = true); 45 void FdFileCreate(ThreadState *thr, uptr pc, int fd); 46 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write); 47 void FdPipeCreate(ThreadState *thr, uptr pc, int rfd, int wfd); 48 void FdEventCreate(ThreadState *thr, uptr pc, int fd); 49 void FdSignalCreate(ThreadState *thr, uptr pc, int fd); 50 void FdInotifyCreate(ThreadState *thr, upt [all...] |
H A D | tsan_rtl_thread.cpp | 24 ThreadContext::ThreadContext(Tid tid) : ThreadContextBase(tid), thr(), sync() {} 74 static void ThreadCheckIgnore(ThreadState *thr) { argument 77 if (thr->ignore_reads_and_writes) 78 ReportIgnoresEnabled(thr->tctx, &thr->mop_ignore_set); 79 if (thr->ignore_sync) 80 ReportIgnoresEnabled(thr->tctx, &thr->sync_ignore_set); 83 static void ThreadCheckIgnore(ThreadState *thr) {} argument 86 void ThreadFinalize(ThreadState *thr) { argument 104 ThreadCount(ThreadState *thr) argument 116 ThreadCreate(ThreadState *thr, uptr pc, uptr uid, bool detached) argument 145 ThreadState *thr; member in struct:__tsan::OnStartedArgs 152 ThreadStart(ThreadState *thr, Tid tid, tid_t os_id, ThreadType thread_type) argument 214 ThreadFinish(ThreadState *thr) argument 284 ThreadConsumeTid(ThreadState *thr, uptr pc, uptr uid) argument 293 ThreadJoin(ThreadState *thr, uptr pc, Tid tid) argument 316 ThreadDetach(ThreadState *thr, uptr pc, Tid tid) argument 323 ThreadNotJoined(ThreadState *thr, uptr pc, Tid tid, uptr uid) argument 328 ThreadSetName(ThreadState *thr, const char *name) argument 340 FiberCreate(ThreadState *thr, uptr pc, unsigned flags) argument 351 FiberDestroy(ThreadState *thr, uptr pc, ThreadState *fiber) argument 358 FiberSwitch(ThreadState *thr, uptr pc, ThreadState *fiber, unsigned flags) argument [all...] |
H A D | tsan_rtl_proc.cpp | 24 proc->thr = nullptr; 34 CHECK_EQ(proc->thr, nullptr); 45 void ProcWire(Processor *proc, ThreadState *thr) { argument 46 CHECK_EQ(thr->proc1, nullptr); 47 CHECK_EQ(proc->thr, nullptr); 48 thr->proc1 = proc; 49 proc->thr = thr; 52 void ProcUnwire(Processor *proc, ThreadState *thr) { argument 53 CHECK_EQ(thr [all...] |
H A D | tsan_fd.cpp | 56 static FdSync *allocsync(ThreadState *thr, uptr pc) { argument 57 FdSync *s = (FdSync*)user_alloc_internal(thr, pc, sizeof(FdSync), 69 static void unref(ThreadState *thr, uptr pc, FdSync *s) { argument 75 user_free(thr, pc, s, false); 80 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { argument 88 void *p = user_alloc_internal(thr, pc, size, kDefaultAlignment, false); 90 MemoryResetRange(thr, (uptr)&fddesc, (uptr)p, size); 94 user_free(thr, pc, p, false); 101 static void init(ThreadState *thr, uptr pc, int fd, FdSync *s, argument 103 FdDesc *d = fddesc(thr, p 145 FdOnFork(ThreadState *thr, uptr pc) argument 178 FdAcquire(ThreadState *thr, uptr pc, int fd) argument 189 FdRelease(ThreadState *thr, uptr pc, int fd) argument 202 FdAccess(ThreadState *thr, uptr pc, int fd) argument 210 FdClose(ThreadState *thr, uptr pc, int fd, bool write) argument 253 FdFileCreate(ThreadState *thr, uptr pc, int fd) argument 260 FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write) argument 271 FdPipeCreate(ThreadState *thr, uptr pc, int rfd, int wfd) argument 279 FdEventCreate(ThreadState *thr, uptr pc, int fd) argument 286 FdSignalCreate(ThreadState *thr, uptr pc, int fd) argument 293 FdInotifyCreate(ThreadState *thr, uptr pc, int fd) argument 300 FdPollCreate(ThreadState *thr, uptr pc, int fd) argument 307 FdPollAdd(ThreadState *thr, uptr pc, int epfd, int fd) argument 331 FdSocketCreate(ThreadState *thr, uptr pc, int fd) argument 339 FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd) argument 348 FdSocketConnecting(ThreadState *thr, uptr pc, int fd) argument 356 FdSocketConnect(ThreadState *thr, uptr pc, int fd) argument [all...] |
H A D | tsan_rtl.cpp | 79 static TracePart* TracePartAlloc(ThreadState* thr) { argument 84 Trace* trace = &thr->tctx->trace; 88 DPrintf("#%d: TracePartAlloc: part=%p\n", thr->tid, part); 151 bool attached = tctx->thr && tctx->thr->slot; 171 &tctx->thr->trace_pos, 180 if (tctx->thr && !tctx->thr->slot) { 181 atomic_store_relaxed(&tctx->thr->trace_pos, 0); 182 tctx->thr 295 SlotAttachAndLock(ThreadState* thr) argument 319 SlotDetachImpl(ThreadState* thr, bool exiting) argument 351 SlotDetach(ThreadState* thr) argument 373 SlotAttachAndLock(thr); variable 376 SlotUnlock(ThreadState* thr) argument 568 UnmapShadow(ThreadState *thr, uptr addr, uptr size) argument 669 ThreadState* thr = cur_thread(); local 680 Initialize(ThreadState *thr) argument 767 Finalize(ThreadState *thr) argument 811 SlotDetach(thr); variable 843 SlotAttachAndLock(thr); variable 844 SlotUnlock(thr); variable 848 ForkParentAfter(ThreadState* thr, uptr pc) argument 850 ForkChildAfter(ThreadState* thr, uptr pc, bool start_thread) argument 875 GrowShadowStack(ThreadState *thr) argument 887 CurrentStackId(ThreadState *thr, uptr pc) argument 909 TraceSkipGap(ThreadState* thr) argument 940 TraceSwitchPart(ThreadState* thr) argument 957 TraceSwitchPartImpl(ThreadState* thr) argument 1033 ThreadIgnoreBegin(ThreadState* thr, uptr pc) argument 1044 ThreadIgnoreEnd(ThreadState *thr) argument 1059 ThreadState *thr = cur_thread(); local 1064 ThreadIgnoreSyncBegin(ThreadState *thr, uptr pc) argument 1074 ThreadIgnoreSyncEnd(ThreadState *thr) argument [all...] |
H A D | tsan_rtl_mutex.cpp | 25 void ReportDeadlock(ThreadState *thr, uptr pc, DDReport *r); 26 void ReportDestroyLocked(ThreadState *thr, uptr pc, uptr addr, 30 ThreadState *thr; member in struct:__tsan::final 33 Callback(ThreadState *thr, uptr pc) argument 34 : thr(thr) 36 DDCallback::pt = thr->proc()->dd_pt; 37 DDCallback::lt = thr->dd_lt; 40 StackID Unwind() override { return CurrentStackId(thr, pc); } 41 int UniqueTid() override { return thr 44 DDMutexInit(ThreadState *thr, uptr pc, SyncVar *s) argument 50 ReportMutexMisuse(ThreadState *thr, uptr pc, ReportType typ, uptr addr, StackID creation_stack_id) argument 68 RecordMutexLock(ThreadState *thr, uptr pc, uptr addr, StackID stack_id, bool write) argument 80 RecordMutexUnlock(ThreadState *thr, uptr addr) argument 86 MutexCreate(ThreadState *thr, uptr pc, uptr addr, u32 flagz) argument 98 MutexDestroy(ThreadState *thr, uptr pc, uptr addr, u32 flagz) argument 140 MutexPreLock(ThreadState *thr, uptr pc, uptr addr, u32 flagz) argument 158 MutexPostLock(ThreadState *thr, uptr pc, uptr addr, u32 flagz, int rec) argument 216 MutexUnlock(ThreadState *thr, uptr pc, uptr addr, u32 flagz) argument 266 MutexPreReadLock(ThreadState *thr, uptr pc, uptr addr, u32 flagz) argument 281 MutexPostReadLock(ThreadState *thr, uptr pc, uptr addr, u32 flagz) argument 324 MutexReadUnlock(ThreadState *thr, uptr pc, uptr addr) argument 365 MutexReadOrWriteUnlock(ThreadState *thr, uptr pc, uptr addr) argument 419 MutexRepair(ThreadState *thr, uptr pc, uptr addr) argument 428 MutexInvalidAccess(ThreadState *thr, uptr pc, uptr addr) argument 441 Acquire(ThreadState *thr, uptr pc, uptr addr) argument 455 AcquireGlobal(ThreadState *thr) argument 463 Release(ThreadState *thr, uptr pc, uptr addr) argument 476 ReleaseStore(ThreadState *thr, uptr pc, uptr addr) argument 489 ReleaseStoreAcquire(ThreadState *thr, uptr pc, uptr addr) argument 502 IncrementEpoch(ThreadState *thr) argument 516 AfterSleep(ThreadState *thr, uptr pc) argument 528 ReportDeadlock(ThreadState *thr, uptr pc, DDReport *r) argument 554 ReportDestroyLocked(ThreadState *thr, uptr pc, uptr addr, FastState last_lock, StackID creation_stack_id) argument [all...] |
H A D | tsan_mman.cpp | 88 ThreadState *thr = cur_thread(); local 89 if (thr->proc()) 106 ProcWire(gp->proc, thr); 111 ThreadState *thr = cur_thread(); local 112 if (thr->proc() != gp->proc) 114 ProcUnwire(gp->proc, thr); 166 static void SignalUnsafeCall(ThreadState *thr, uptr pc) { argument 167 if (atomic_load_relaxed(&thr->in_signal_handler) == 0 || 168 !ShouldReport(thr, ReportTypeSignalUnsafe)) 171 ObtainCurrentStack(thr, p 181 user_alloc_internal(ThreadState *thr, uptr pc, uptr sz, uptr align, bool signal) argument 213 user_free(ThreadState *thr, uptr pc, void *p, bool signal) argument 222 user_alloc(ThreadState *thr, uptr pc, uptr sz) argument 226 user_calloc(ThreadState *thr, uptr pc, uptr size, uptr n) argument 239 user_reallocarray(ThreadState *thr, uptr pc, void *p, uptr size, uptr n) argument 249 OnUserAlloc(ThreadState *thr, uptr pc, uptr p, uptr sz, bool write) argument 267 OnUserFree(ThreadState *thr, uptr pc, uptr p, bool write) argument 282 user_realloc(ThreadState *thr, uptr pc, void *p, uptr sz) argument 300 user_memalign(ThreadState *thr, uptr pc, uptr align, uptr sz) argument 311 user_posix_memalign(ThreadState *thr, uptr pc, void **memptr, uptr align, uptr sz) argument 328 user_aligned_alloc(ThreadState *thr, uptr pc, uptr align, uptr sz) argument 339 user_valloc(ThreadState *thr, uptr pc, uptr sz) argument 343 user_pvalloc(ThreadState *thr, uptr pc, uptr sz) argument 394 ThreadState *thr = cur_thread(); local 401 ThreadState *thr = cur_thread(); local 408 ThreadState *thr = cur_thread(); local 418 ThreadState *thr = cur_thread(); local 480 ThreadState *thr = cur_thread(); local [all...] |
H A D | tsan_rtl.h | 114 ThreadState *thr; // currently wired thread, or nullptr member in struct:__tsan::Processor 143 ThreadState *thr; member in struct:__tsan::TidSlot 242 void set_cur_thread(ThreadState *thr); 252 ThreadState *thr = reinterpret_cast<ThreadState *>(cur_thread_placeholder); local 253 if (UNLIKELY(!thr->current)) 254 thr->current = thr; 255 return thr->current; 257 inline void set_cur_thread(ThreadState *thr) { argument 258 reinterpret_cast<ThreadState *>(cur_thread_placeholder)->current = thr; 268 ThreadState *thr; member in class:__tsan::final 465 ObtainCurrentStack(ThreadState *thr, uptr toppc, StackTraceTy *stack, uptr *tag = nullptr) argument 536 MemoryAccessRange(ThreadState *thr, uptr pc, uptr addr, uptr size, bool is_write) argument 631 SlotLocker(ThreadState *thr, bool recursive = false) argument 657 SlotUnlocker(ThreadState *thr) argument 672 ProcessPendingSignals(ThreadState *thr) argument 680 LazyInitialize(ThreadState *thr) argument 699 TraceAcquire(ThreadState *thr, EventT **ev) argument 729 TraceRelease(ThreadState *thr, EventT *evp) argument 735 TraceEvent(ThreadState *thr, EventT ev) argument 746 TryTraceFunc(ThreadState *thr, uptr pc = 0) argument 780 FuncEntry(ThreadState *thr, uptr pc) argument 796 FuncExit(ThreadState *thr) argument [all...] |
H A D | tsan_interface.cpp | 31 ThreadState *thr = cur_thread(); local 32 MemoryAccess(thr, pc_no_pac, (uptr)addr, 8, kAccessRead); 33 MemoryAccess(thr, pc_no_pac, (uptr)addr + 8, 8, kAccessRead); 38 ThreadState *thr = cur_thread(); local 39 MemoryAccess(thr, pc_no_pac, (uptr)addr, 8, kAccessWrite); 40 MemoryAccess(thr, pc_no_pac, (uptr)addr + 8, 8, kAccessWrite); 47 ThreadState *thr = cur_thread(); local 48 UnalignedMemoryAccess(thr, pc, (uptr)addr, 8, kAccessRead); 49 UnalignedMemoryAccess(thr, pc, (uptr)addr + 8, 8, kAccessRead); 54 ThreadState *thr local [all...] |
/freebsd-current/contrib/llvm-project/compiler-rt/lib/tsan/dd/ |
H A D | dd_rtl.cpp | 21 static u32 CurrentStackTrace(Thread *thr, uptr skip) { argument 23 thr->ignore_interceptors = true; 25 thr->ignore_interceptors = false; 31 static void PrintStackTrace(Thread *thr, u32 stk) { argument 33 thr->ignore_interceptors = true; 35 thr->ignore_interceptors = false; 38 static void ReportDeadlock(Thread *thr, DDReport *rep) { argument 47 PrintStackTrace(thr, rep->loop[i].stk[1]); 51 PrintStackTrace(thr, rep->loop[i].stk[0]); 57 Callback::Callback(Thread *thr) argument 99 ThreadInit(Thread *thr) argument 106 ThreadDestroy(Thread *thr) argument 111 MutexBeforeLock(Thread *thr, uptr m, bool writelock) argument 124 MutexAfterLock(Thread *thr, uptr m, bool writelock, bool trylock) argument 137 MutexBeforeUnlock(Thread *thr, uptr m, bool writelock) argument 148 MutexDestroy(Thread *thr, uptr m) argument [all...] |
H A D | dd_rtl.h | 34 Thread *thr; member in struct:__dsan::final 36 Callback(Thread *thr); 57 void ThreadInit(Thread *thr); 58 void ThreadDestroy(Thread *thr); 60 void MutexBeforeLock(Thread *thr, uptr m, bool writelock); 61 void MutexAfterLock(Thread *thr, uptr m, bool writelock, bool trylock); 62 void MutexBeforeUnlock(Thread *thr, uptr m, bool writelock); 63 void MutexDestroy(Thread *thr, uptr m);
|
/freebsd-current/lib/libthr/arch/aarch64/include/ |
H A D | pthread_tls.h | 35 _get_static_tls_base(struct pthread *thr, size_t offset) argument 39 tlsbase = (uintptr_t)thr->tcb;
|
/freebsd-current/lib/libthr/arch/amd64/include/ |
H A D | pthread_tls.h | 35 _get_static_tls_base(struct pthread *thr, size_t offset) argument 39 tlsbase = (uintptr_t)thr->tcb;
|
H A D | pthread_md.h | 48 struct pthread *thr; local 50 __asm __volatile("movq %%fs:%1, %0" : "=r" (thr) 52 return (thr);
|
/freebsd-current/lib/libthr/arch/arm/include/ |
H A D | pthread_tls.h | 35 _get_static_tls_base(struct pthread *thr, size_t offset) argument 39 tlsbase = (uintptr_t)thr->tcb;
|
/freebsd-current/lib/libthr/arch/powerpc/include/ |
H A D | pthread_tls.h | 35 _get_static_tls_base(struct pthread *thr, size_t offset) argument 39 tlsbase = (uintptr_t)thr->tcb;
|
/freebsd-current/lib/libthr/arch/riscv/include/ |
H A D | pthread_tls.h | 35 _get_static_tls_base(struct pthread *thr, size_t offset) argument 39 tlsbase = (uintptr_t)thr->tcb;
|
/freebsd-current/lib/libthr/arch/i386/include/ |
H A D | pthread_tls.h | 35 _get_static_tls_base(struct pthread *thr, size_t offset) argument 39 tlsbase = (uintptr_t)thr->tcb;
|
H A D | pthread_md.h | 48 struct pthread *thr; local 50 __asm __volatile("movl %%gs:%1, %0" : "=r" (thr) 52 return (thr);
|
/freebsd-current/contrib/llvm-project/compiler-rt/lib/tsan/go/ |
H A D | tsan_go.cpp | 143 auto *thr = (ThreadState *)Alloc(sizeof(ThreadState)); local 144 internal_memset(thr, 0, sizeof(*thr)); 145 return thr; 151 ThreadState *thr = AllocGoroutine(); local 152 main_thr = *thrp = thr; 153 Initialize(thr); 154 *procp = thr->proc1; 160 ThreadState *thr = main_thr; local 161 int res = Finalize(thr); 169 __tsan_read(ThreadState *thr, void *addr, void *pc) argument 173 __tsan_read_pc(ThreadState *thr, void *addr, uptr callpc, uptr pc) argument 181 __tsan_write(ThreadState *thr, void *addr, void *pc) argument 185 __tsan_write_pc(ThreadState *thr, void *addr, uptr callpc, uptr pc) argument 193 __tsan_read_range(ThreadState *thr, void *addr, uptr size, uptr pc) argument 197 __tsan_write_range(ThreadState *thr, void *addr, uptr size, uptr pc) argument 201 __tsan_func_enter(ThreadState *thr, void *pc) argument 205 __tsan_func_exit(ThreadState *thr) argument 209 __tsan_malloc(ThreadState *thr, uptr pc, uptr p, uptr sz) argument 221 ThreadState *thr = AllocGoroutine(); local 227 __tsan_go_end(ThreadState *thr) argument 240 __tsan_acquire(ThreadState *thr, void *addr) argument 244 __tsan_release_acquire(ThreadState *thr, void *addr) argument 248 __tsan_release(ThreadState *thr, void *addr) argument 252 __tsan_release_merge(ThreadState *thr, void *addr) argument 256 __tsan_finalizer_goroutine(ThreadState *thr) argument 258 __tsan_mutex_before_lock(ThreadState *thr, uptr addr, uptr write) argument 265 __tsan_mutex_after_lock(ThreadState *thr, uptr addr, uptr write) argument 272 __tsan_mutex_before_unlock(ThreadState *thr, uptr addr, uptr write) argument 279 __tsan_go_ignore_sync_begin(ThreadState *thr) argument 283 __tsan_go_ignore_sync_end(ThreadState *thr) argument [all...] |
H A D | test.c | 18 void __tsan_init(void **thr, void **proc, void (*cb)(long, void*)); 21 void __tsan_go_start(void *thr, void **chthr, void *pc); 22 void __tsan_go_end(void *thr); 25 void __tsan_proc_wire(void *proc, void *thr); 26 void __tsan_proc_unwire(void *proc, void *thr); 27 void __tsan_read(void *thr, void *addr, void *pc); 28 void __tsan_write(void *thr, void *addr, void *pc); 29 void __tsan_func_enter(void *thr, void *pc); 30 void __tsan_func_exit(void *thr); 31 void __tsan_malloc(void *thr, voi [all...] |
/freebsd-current/sys/ddb/ |
H A D | db_thread.c | 54 struct thread *thr; local 58 thr = db_lookup_thread(tid, false); 59 if (thr != NULL) { 60 err = kdb_thr_select(thr); 63 (long)thr->td_tid); 82 struct thread *thr; local 84 thr = kdb_thr_first(); 85 while (!db_pager_quit && thr != NULL) { 86 db_printf(" %6ld (%p) (stack %p) ", (long)thr->td_tid, thr, [all...] |
/freebsd-current/tools/test/stress2/misc/ |
H A D | thr.sh | 36 sed '1,/^EOF/d' < $odir/$0 > $dir/thr.c 37 mycc -o thr -Wall -Wextra thr.c -pthread || exit 1 38 rm -f thr.c 40 touch thr.continue 44 while [ -r thr.continue ]; do 45 ./thr & 47 n=`ps -xH | egrep "thr$" | grep -v grep | wc -l | sed 's/ //g'` 52 killall thr 57 rm -f /tmp/thr /tm [all...] |
/freebsd-current/lib/libc/tests/stdlib/dynthr_mod/ |
H A D | dynthr_mod.c | 43 static pthread_t thr; variable 62 rc = pthread_create(&thr, NULL, mod_thread, NULL); 67 pthread_join(thr, NULL);
|
/freebsd-current/contrib/xz/src/liblzma/common/ |
H A D | stream_encoder_mt.c | 183 worker_thread *thr; member in struct:lzma_stream_coder_s 202 worker_error(worker_thread *thr, lzma_ret ret) argument 207 mythread_sync(thr->coder->mutex) { 208 if (thr->coder->thread_error == LZMA_OK) 209 thr->coder->thread_error = ret; 211 mythread_cond_signal(&thr->coder->cond); 219 worker_encode(worker_thread *thr, size_t *out_pos, worker_state state) argument 221 assert(thr->progress_in == 0); 222 assert(thr->progress_out == 0); 225 thr 365 worker_thread *thr = thr_ptr; local 499 worker_thread *thr = &coder->threads[coder->threads_initialized]; local [all...] |