MCPcopy Create free account
hub / github.com/chromium/crashpad / ThreadMain

Method ThreadMain

snapshot/linux/process_reader_linux_test.cc:251–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249 };
250
251 static void* ThreadMain(void* argument) {
252 Thread* thread = static_cast<Thread*>(argument);
253 const ScopedSetThreadName scoped_set_thread_name(thread->name);
254
255 CHECK_EQ(setpriority(PRIO_PROCESS, 0, thread->expectation.nice_value), 0)
256 << ErrnoMessage("setpriority");
257
258 thread->expectation.tls = GetTLS();
259 thread->expectation.stack_address =
260 reinterpret_cast<LinuxVMAddress>(&thread);
261 thread->tid = gettid();
262
263 thread->ready_semaphore.Signal();
264 thread->exit_semaphore.Wait();
265
266 CHECK_EQ(pthread_self(), thread->pthread);
267
268 return nullptr;
269 }
270
271 std::vector<std::unique_ptr<Thread>> threads_;
272};

Callers

nothing calls this directly

Calls 5

ErrnoMessageFunction · 0.85
GetTLSFunction · 0.85
gettidFunction · 0.70
SignalMethod · 0.45
WaitMethod · 0.45

Tested by

no test coverage detected