forked from OSchip/llvm-project
Partially revert "[NFC][msan] Split ThreadStart and Init"
I don't know if removing "if (!start_routine_)" from ThreadStart
is NFC.
This reverts commit b3267bb3af
.
This commit is contained in:
parent
6cad45d5c6
commit
a5b06ad39a
|
@ -65,7 +65,18 @@ void MsanThread::Destroy() {
|
|||
DTLS_Destroy();
|
||||
}
|
||||
|
||||
thread_return_t MsanThread::ThreadStart() { return start_routine_(arg_); }
|
||||
thread_return_t MsanThread::ThreadStart() {
|
||||
if (!start_routine_) {
|
||||
// start_routine_ == 0 if we're on the main thread or on one of the
|
||||
// OS X libdispatch worker threads. But nobody is supposed to call
|
||||
// ThreadStart() for the worker threads.
|
||||
return 0;
|
||||
}
|
||||
|
||||
thread_return_t res = start_routine_(arg_);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
MsanThread::StackBounds MsanThread::GetStackBounds() const {
|
||||
if (!stack_switching_)
|
||||
|
|
Loading…
Reference in New Issue