Lines Matching defs:thread
102 // will never be called. Instead, our own thread destruction hook
118 // Shared setup between thread creation and startup for the initial thread.
122 AsanThread *thread = (AsanThread *)MmapOrDie(AsanThreadMmapSize(), __func__);
124 u32 tid = asanThreadRegistry().CreateThread(0, detached, parent_tid, thread);
127 return thread;
131 // We're in the creator thread before the new thread is actually started,
156 // We need to set the current thread before calling AsanThread::Init() below,
157 // since it reads the thread ID.
168 // This is called before each thread creation is attempted. So, in
169 // its first call, the calling thread is the initial and sole thread.
174 // Strict init-order checking is thread-hostile.
181 AsanThread *thread = CreateAsanThread(&stack, parent_tid, detached, name);
184 // thread itself. But on Fuchsia we already know the stack address
187 thread->Init(&options);
188 return thread;
191 // This is called after creating a new thread (in the creating thread),
194 AsanThread *thread = static_cast<AsanThread *>(hook);
196 // The thread was created successfully.
197 // ThreadStartHook is already running in the new thread.
199 // The thread wasn't created after all.
201 asanThreadRegistry().FinishThread(thread->tid());
202 UnmapOrDie(thread, AsanThreadMmapSize());
206 // This is called in the newly-created thread before it runs anything else,
210 AsanThread *thread = static_cast<AsanThread *>(hook);
211 SetCurrentThread(thread);
214 asanThreadRegistry().StartThread(thread->tid(), os_id, ThreadType::Regular,
218 // Each thread runs this just before it exits,
220 // All per-thread destructors have already been called.
253 void *__sanitizer_before_thread_create_hook(thrd_t thread, bool detached,
257 reinterpret_cast<uptr>(thread), detached, name,
261 void __sanitizer_thread_create_hook(void *hook, thrd_t thread, int error) {