Home
last modified time | relevance | path

Searched refs:ThreadState (Results 1 – 25 of 90) sorted by relevance

1234

/netbsd-src/external/gpl3/gcc/dist/libsanitizer/tsan/
H A Dtsan_rtl.h112 ThreadState *thr; // currently wired thread, or nullptr
134 struct ThreadState { struct
150 ThreadState* current; argument
223 explicit ThreadState(Context *ctx, Tid tid, int unique_id, u64 epoch, argument
230 ThreadState *cur_thread();
231 void set_cur_thread(ThreadState *thr);
233 inline ThreadState *cur_thread_init() { return cur_thread(); } in cur_thread_init()
237 inline ThreadState *cur_thread() { in cur_thread()
238 …return reinterpret_cast<ThreadState *>((reinterpret_cast<uptr>(cur_thread_placeholder) + SANITIZER… in cur_thread()
240 inline ThreadState *cur_thread_init() { in cur_thread_init()
[all …]
H A Dtsan_fd.h41 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, uptr pc, int fd);
[all …]
H A Dtsan_rtl_thread.cpp78 static void ThreadCheckIgnore(ThreadState *thr) { in ThreadCheckIgnore()
87 static void ThreadCheckIgnore(ThreadState *thr) {} in ThreadCheckIgnore()
90 void ThreadFinalize(ThreadState *thr) { in ThreadFinalize()
108 int ThreadCount(ThreadState *thr) { in ThreadCount()
115 ThreadState *thr;
119 Tid ThreadCreate(ThreadState *thr, uptr pc, uptr uid, bool detached) { in ThreadCreate()
144 ThreadState *thr;
151 void ThreadStart(ThreadState *thr, Tid tid, tid_t os_id, in ThreadStart()
202 ThreadState(ctx, tid, unique_id, epoch0, reuse_count, args->stk_addr, in OnStarted()
223 void ThreadFinish(ThreadState *thr) { in ThreadFinish()
[all …]
H A Dtsan_mman.h29 void *user_alloc_internal(ThreadState *thr, uptr pc, uptr sz,
32 void user_free(ThreadState *thr, uptr pc, void *p, bool signal = true);
34 void *user_alloc(ThreadState *thr, uptr pc, uptr sz);
35 void *user_calloc(ThreadState *thr, uptr pc, uptr sz, uptr n);
36 void *user_realloc(ThreadState *thr, uptr pc, void *p, uptr sz);
37 void *user_reallocarray(ThreadState *thr, uptr pc, void *p, uptr sz, uptr n);
38 void *user_memalign(ThreadState *thr, uptr pc, uptr align, uptr sz);
39 int user_posix_memalign(ThreadState *thr, uptr pc, void **memptr, uptr align,
41 void *user_aligned_alloc(ThreadState *thr, uptr pc, uptr align, uptr sz);
42 void *user_valloc(ThreadState *thr, uptr pc, uptr sz);
[all …]
H A Dtsan_mman.cpp83 ThreadState *thr = cur_thread(); in ScopedGlobalProcessor()
106 ThreadState *thr = cur_thread(); in ~ScopedGlobalProcessor()
143 static void SignalUnsafeCall(ThreadState *thr, uptr pc) { in SignalUnsafeCall()
158 void *user_alloc_internal(ThreadState *thr, uptr pc, uptr sz, uptr align, in user_alloc_internal()
184 void user_free(ThreadState *thr, uptr pc, void *p, bool signal) { in user_free()
193 void *user_alloc(ThreadState *thr, uptr pc, uptr sz) { in user_alloc()
197 void *user_calloc(ThreadState *thr, uptr pc, uptr size, uptr n) { in user_calloc()
210 void *user_reallocarray(ThreadState *thr, uptr pc, void *p, uptr size, uptr n) { in user_reallocarray()
220 void OnUserAlloc(ThreadState *thr, uptr pc, uptr p, uptr sz, bool write) { in OnUserAlloc()
229 void OnUserFree(ThreadState *thr, uptr pc, uptr p, bool write) { in OnUserFree()
[all …]
H A Dtsan_fd.cpp49 static FdSync *allocsync(ThreadState *thr, uptr pc) { in allocsync()
62 static void unref(ThreadState *thr, uptr pc, FdSync *s) { in unref()
73 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { in fddesc()
94 static void init(ThreadState *thr, uptr pc, int fd, FdSync *s, in init()
128 void FdOnFork(ThreadState *thr, uptr pc) { in FdOnFork()
160 void FdAcquire(ThreadState *thr, uptr pc, int fd) { in FdAcquire()
171 void FdRelease(ThreadState *thr, uptr pc, int fd) { in FdRelease()
182 void FdAccess(ThreadState *thr, uptr pc, int fd) { in FdAccess()
190 void FdClose(ThreadState *thr, uptr pc, int fd, bool write) { in FdClose()
218 void FdFileCreate(ThreadState *thr, uptr pc, int fd) { in FdFileCreate()
[all …]
H A Dtsan_platform_mac.cpp76 ALIGNED(64) static char main_thread_state[sizeof(ThreadState)];
77 static ThreadState *main_thread_state_loc = (ThreadState *)main_thread_state;
82 static ThreadState **cur_thread_location() { in cur_thread_location()
88 return (ThreadState **)MemToShadow(thread_identity); in cur_thread_location()
91 ThreadState *cur_thread() { in cur_thread()
92 return (ThreadState *)SignalSafeGetOrAllocate( in cur_thread()
93 (uptr *)cur_thread_location(), sizeof(ThreadState)); in cur_thread()
96 void set_cur_thread(ThreadState *thr) { in set_cur_thread()
104 ThreadState **thr_state_loc = cur_thread_location(); in cur_thread_finalize()
110 internal_munmap(*thr_state_loc, sizeof(ThreadState)); in cur_thread_finalize()
[all …]
H A Dtsan_interface.cpp31 ThreadState *thr = cur_thread(); in __tsan_read16()
38 ThreadState *thr = cur_thread(); in __tsan_write16()
45 ThreadState *thr = cur_thread(); in __tsan_read16_pc()
52 ThreadState *thr = cur_thread(); in __tsan_write16_pc()
61 ThreadState *thr = cur_thread(); in __tsan_unaligned_read16()
68 ThreadState *thr = cur_thread(); in __tsan_unaligned_write16()
86 FiberDestroy(cur_thread(), CALLERPC, static_cast<ThreadState *>(fiber)); in __tsan_destroy_fiber()
91 FiberSwitch(cur_thread(), CALLERPC, static_cast<ThreadState *>(fiber), flags); in __tsan_switch_to_fiber()
96 ThreadSetName(static_cast<ThreadState *>(fiber), name); in __tsan_set_fiber_name()
/netbsd-src/sys/external/bsd/compiler_rt/dist/lib/tsan/rtl/
H A Dtsan_rtl.h352 ThreadState *thr; // currently wired thread, or nullptr
374 struct ThreadState { struct
456 explicit ThreadState(Context *ctx, int tid, int unique_id, u64 epoch, argument
464 ThreadState *cur_thread();
469 INLINE ThreadState *cur_thread() { in cur_thread()
470 return reinterpret_cast<ThreadState *>(&cur_thread_placeholder); in cur_thread()
480 ThreadState *thr;
643 void ObtainCurrentStack(ThreadState *thr, uptr toppc, StackTraceTy *stack,
665 void ALWAYS_INLINE StatInc(ThreadState *thr, StatType typ, u64 n = 1) {
670 void ALWAYS_INLINE StatSet(ThreadState *thr, StatType typ, u64 n) { in StatSet()
[all …]
H A Dtsan_fd.h42 void FdAcquire(ThreadState *thr, uptr pc, int fd);
43 void FdRelease(ThreadState *thr, uptr pc, int fd);
44 void FdAccess(ThreadState *thr, uptr pc, int fd);
45 void FdClose(ThreadState *thr, uptr pc, int fd, bool write = true);
46 void FdFileCreate(ThreadState *thr, uptr pc, int fd);
47 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write);
48 void FdPipeCreate(ThreadState *thr, uptr pc, int rfd, int wfd);
49 void FdEventCreate(ThreadState *thr, uptr pc, int fd);
50 void FdSignalCreate(ThreadState *thr, uptr pc, int fd);
51 void FdInotifyCreate(ThreadState *thr, uptr pc, int fd);
[all …]
H A Dtsan_platform_mac.cc76 ALIGNED(64) static char main_thread_state[sizeof(ThreadState)];
78 ThreadState **cur_thread_location() { in cur_thread_location()
79 ThreadState **thread_identity = (ThreadState **)pthread_self(); in cur_thread_location()
84 ThreadState *cur_thread() { in cur_thread()
85 ThreadState **thr_state_loc = cur_thread_location(); in cur_thread()
87 return (ThreadState *)&main_thread_state; in cur_thread()
89 ThreadState **fake_tls = (ThreadState **)MemToShadow((uptr)thr_state_loc); in cur_thread()
90 ThreadState *thr = (ThreadState *)SignalSafeGetOrAllocate( in cur_thread()
91 (uptr *)fake_tls, sizeof(ThreadState)); in cur_thread()
99 ThreadState **thr_state_loc = cur_thread_location(); in cur_thread_finalize()
[all …]
H A Dtsan_mman.h30 void *user_alloc_internal(ThreadState *thr, uptr pc, uptr sz,
33 void user_free(ThreadState *thr, uptr pc, void *p, bool signal = true);
35 void *user_alloc(ThreadState *thr, uptr pc, uptr sz);
36 void *user_calloc(ThreadState *thr, uptr pc, uptr sz, uptr n);
37 void *user_realloc(ThreadState *thr, uptr pc, void *p, uptr sz);
38 void *user_memalign(ThreadState *thr, uptr pc, uptr align, uptr sz);
39 int user_posix_memalign(ThreadState *thr, uptr pc, void **memptr, uptr align,
41 void *user_aligned_alloc(ThreadState *thr, uptr pc, uptr align, uptr sz);
42 void *user_valloc(ThreadState *thr, uptr pc, uptr sz);
43 void *user_pvalloc(ThreadState *thr, uptr pc, uptr sz);
H A Dtsan_fd.cc50 static FdSync *allocsync(ThreadState *thr, uptr pc) { in allocsync()
63 static void unref(ThreadState *thr, uptr pc, FdSync *s) { in unref()
74 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { in fddesc()
94 static void init(ThreadState *thr, uptr pc, int fd, FdSync *s, in init()
128 void FdOnFork(ThreadState *thr, uptr pc) { in FdOnFork()
160 void FdAcquire(ThreadState *thr, uptr pc, int fd) { in FdAcquire()
171 void FdRelease(ThreadState *thr, uptr pc, int fd) { in FdRelease()
182 void FdAccess(ThreadState *thr, uptr pc, int fd) { in FdAccess()
190 void FdClose(ThreadState *thr, uptr pc, int fd, bool write) { in FdClose()
218 void FdFileCreate(ThreadState *thr, uptr pc, int fd) { in FdFileCreate()
[all …]
H A Dtsan_mman.cc87 ThreadState *thr = cur_thread(); in ScopedGlobalProcessor()
110 ThreadState *thr = cur_thread(); in ~ScopedGlobalProcessor()
140 static void SignalUnsafeCall(ThreadState *thr, uptr pc) { in SignalUnsafeCall()
156 void *user_alloc_internal(ThreadState *thr, uptr pc, uptr sz, uptr align, in user_alloc_internal()
179 void user_free(ThreadState *thr, uptr pc, void *p, bool signal) { in user_free()
188 void *user_alloc(ThreadState *thr, uptr pc, uptr sz) { in user_alloc()
192 void *user_calloc(ThreadState *thr, uptr pc, uptr size, uptr n) { in user_calloc()
205 void OnUserAlloc(ThreadState *thr, uptr pc, uptr p, uptr sz, bool write) { in OnUserAlloc()
214 void OnUserFree(ThreadState *thr, uptr pc, uptr p, bool write) { in OnUserFree()
222 void *user_realloc(ThreadState *thr, uptr pc, void *p, uptr sz) { in user_realloc()
[all …]
H A Dtsan_rtl_thread.cc43 ThreadState *caller_thr = static_cast<ThreadState *>(arg); in OnJoined()
49 ThreadState *thr;
77 ThreadState *thr1 = static_cast<ThreadState*>(arg); in OnDetached()
82 ThreadState *thr;
96 new(thr) ThreadState(ctx, tid, unique_id, epoch0, reuse_count, in OnStarted()
149 thr->~ThreadState(); in OnFinished()
196 static void ThreadCheckIgnore(ThreadState *thr) { in ThreadCheckIgnore()
205 static void ThreadCheckIgnore(ThreadState *thr) {} in ThreadCheckIgnore()
208 void ThreadFinalize(ThreadState *thr) { in ThreadFinalize()
226 int ThreadCount(ThreadState *thr) { in ThreadCount()
[all …]
H A Dtsan_rtl_mutex.cc26 void ReportDeadlock(ThreadState *thr, uptr pc, DDReport *r);
29 ThreadState *thr;
32 Callback(ThreadState *thr, uptr pc) in Callback()
43 void DDMutexInit(ThreadState *thr, uptr pc, SyncVar *s) { in DDMutexInit()
49 static void ReportMutexMisuse(ThreadState *thr, uptr pc, ReportType typ, in ReportMutexMisuse()
65 void MutexCreate(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { in MutexCreate()
81 void MutexDestroy(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { in MutexDestroy()
143 void MutexPreLock(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { in MutexPreLock()
159 void MutexPostLock(ThreadState *thr, uptr pc, uptr addr, u32 flagz, int rec) { in MutexPostLock()
214 int MutexUnlock(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { in MutexUnlock()
[all …]
/netbsd-src/external/gpl3/gcc.old/dist/libsanitizer/tsan/
H A Dtsan_rtl.h348 ThreadState *thr; // currently wired thread, or nullptr
370 struct ThreadState { struct
452 explicit ThreadState(Context *ctx, int tid, int unique_id, u64 epoch, argument
460 ThreadState *cur_thread();
465 INLINE ThreadState *cur_thread() { in cur_thread()
466 return reinterpret_cast<ThreadState *>(&cur_thread_placeholder); in cur_thread()
476 ThreadState *thr;
639 void ObtainCurrentStack(ThreadState *thr, uptr toppc, StackTraceTy *stack,
661 void ALWAYS_INLINE StatInc(ThreadState *thr, StatType typ, u64 n = 1) {
666 void ALWAYS_INLINE StatSet(ThreadState *thr, StatType typ, u64 n) { in StatSet()
[all …]
H A Dtsan_fd.h40 void FdAcquire(ThreadState *thr, uptr pc, int fd);
41 void FdRelease(ThreadState *thr, uptr pc, int fd);
42 void FdAccess(ThreadState *thr, uptr pc, int fd);
43 void FdClose(ThreadState *thr, uptr pc, int fd, bool write = true);
44 void FdFileCreate(ThreadState *thr, uptr pc, int fd);
45 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write);
46 void FdPipeCreate(ThreadState *thr, uptr pc, int rfd, int wfd);
47 void FdEventCreate(ThreadState *thr, uptr pc, int fd);
48 void FdSignalCreate(ThreadState *thr, uptr pc, int fd);
49 void FdInotifyCreate(ThreadState *thr, uptr pc, int fd);
[all …]
H A Dtsan_platform_mac.cc74 ALIGNED(64) static char main_thread_state[sizeof(ThreadState)];
76 ThreadState **cur_thread_location() { in cur_thread_location()
77 ThreadState **thread_identity = (ThreadState **)pthread_self(); in cur_thread_location()
82 ThreadState *cur_thread() { in cur_thread()
83 ThreadState **thr_state_loc = cur_thread_location(); in cur_thread()
85 return (ThreadState *)&main_thread_state; in cur_thread()
87 ThreadState **fake_tls = (ThreadState **)MemToShadow((uptr)thr_state_loc); in cur_thread()
88 ThreadState *thr = (ThreadState *)SignalSafeGetOrAllocate( in cur_thread()
89 (uptr *)fake_tls, sizeof(ThreadState)); in cur_thread()
97 ThreadState **thr_state_loc = cur_thread_location(); in cur_thread_finalize()
[all …]
H A Dtsan_mman.h28 void *user_alloc_internal(ThreadState *thr, uptr pc, uptr sz,
31 void user_free(ThreadState *thr, uptr pc, void *p, bool signal = true);
33 void *user_alloc(ThreadState *thr, uptr pc, uptr sz);
34 void *user_calloc(ThreadState *thr, uptr pc, uptr sz, uptr n);
35 void *user_realloc(ThreadState *thr, uptr pc, void *p, uptr sz);
36 void *user_memalign(ThreadState *thr, uptr pc, uptr align, uptr sz);
37 int user_posix_memalign(ThreadState *thr, uptr pc, void **memptr, uptr align,
39 void *user_aligned_alloc(ThreadState *thr, uptr pc, uptr align, uptr sz);
40 void *user_valloc(ThreadState *thr, uptr pc, uptr sz);
41 void *user_pvalloc(ThreadState *thr, uptr pc, uptr sz);
H A Dtsan_fd.cc48 static FdSync *allocsync(ThreadState *thr, uptr pc) { in allocsync()
61 static void unref(ThreadState *thr, uptr pc, FdSync *s) { in unref()
72 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { in fddesc()
92 static void init(ThreadState *thr, uptr pc, int fd, FdSync *s, in init()
126 void FdOnFork(ThreadState *thr, uptr pc) { in FdOnFork()
158 void FdAcquire(ThreadState *thr, uptr pc, int fd) { in FdAcquire()
169 void FdRelease(ThreadState *thr, uptr pc, int fd) { in FdRelease()
180 void FdAccess(ThreadState *thr, uptr pc, int fd) { in FdAccess()
188 void FdClose(ThreadState *thr, uptr pc, int fd, bool write) { in FdClose()
216 void FdFileCreate(ThreadState *thr, uptr pc, int fd) { in FdFileCreate()
[all …]
H A Dtsan_mman.cc85 ThreadState *thr = cur_thread(); in ScopedGlobalProcessor()
108 ThreadState *thr = cur_thread(); in ~ScopedGlobalProcessor()
138 static void SignalUnsafeCall(ThreadState *thr, uptr pc) { in SignalUnsafeCall()
154 void *user_alloc_internal(ThreadState *thr, uptr pc, uptr sz, uptr align, in user_alloc_internal()
177 void user_free(ThreadState *thr, uptr pc, void *p, bool signal) { in user_free()
186 void *user_alloc(ThreadState *thr, uptr pc, uptr sz) { in user_alloc()
190 void *user_calloc(ThreadState *thr, uptr pc, uptr size, uptr n) { in user_calloc()
203 void OnUserAlloc(ThreadState *thr, uptr pc, uptr p, uptr sz, bool write) { in OnUserAlloc()
212 void OnUserFree(ThreadState *thr, uptr pc, uptr p, bool write) { in OnUserFree()
220 void *user_realloc(ThreadState *thr, uptr pc, void *p, uptr sz) { in user_realloc()
[all …]
H A Dtsan_rtl_thread.cc41 ThreadState *caller_thr = static_cast<ThreadState *>(arg); in OnJoined()
47 ThreadState *thr;
75 ThreadState *thr1 = static_cast<ThreadState*>(arg); in OnDetached()
80 ThreadState *thr;
94 new(thr) ThreadState(ctx, tid, unique_id, epoch0, reuse_count, in OnStarted()
147 thr->~ThreadState(); in OnFinished()
194 static void ThreadCheckIgnore(ThreadState *thr) { in ThreadCheckIgnore()
203 static void ThreadCheckIgnore(ThreadState *thr) {} in ThreadCheckIgnore()
206 void ThreadFinalize(ThreadState *thr) { in ThreadFinalize()
224 int ThreadCount(ThreadState *thr) { in ThreadCount()
[all …]
H A Dtsan_rtl_mutex.cc24 void ReportDeadlock(ThreadState *thr, uptr pc, DDReport *r);
27 ThreadState *thr;
30 Callback(ThreadState *thr, uptr pc) in Callback()
41 void DDMutexInit(ThreadState *thr, uptr pc, SyncVar *s) { in DDMutexInit()
47 static void ReportMutexMisuse(ThreadState *thr, uptr pc, ReportType typ, in ReportMutexMisuse()
63 void MutexCreate(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { in MutexCreate()
79 void MutexDestroy(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { in MutexDestroy()
141 void MutexPreLock(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { in MutexPreLock()
157 void MutexPostLock(ThreadState *thr, uptr pc, uptr addr, u32 flagz, int rec) { in MutexPostLock()
212 int MutexUnlock(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { in MutexUnlock()
[all …]
/netbsd-src/sys/external/bsd/compiler_rt/dist/lib/tsan/go/
H A Dtsan_go.cc113 static ThreadState *main_thr;
128 Processor *ThreadState::proc() { in proc()
134 static ThreadState *AllocGoroutine() { in AllocGoroutine()
135 ThreadState *thr = (ThreadState*)internal_alloc(MBlockThreadContex, in AllocGoroutine()
136 sizeof(ThreadState)); in AllocGoroutine()
141 void __tsan_init(ThreadState **thrp, Processor **procp, in __tsan_init()
144 ThreadState *thr = AllocGoroutine(); in __tsan_init()
153 ThreadState *thr = main_thr; in __tsan_fini()
162 void __tsan_read(ThreadState *thr, void *addr, void *pc) { in __tsan_read()
166 void __tsan_read_pc(ThreadState *thr, void *addr, uptr callpc, uptr pc) { in __tsan_read_pc()
[all …]

1234