[Threading] Remove thread_get_main().

Removing thread_get_main() means we don't need a static initializer on
Darwin, which means we can delete Darwin.cpp as well.  We can also delete
Nothreads.cpp while we're about it, because there's nothing in that file.

rdar://90776105
This commit is contained in:
Alastair Houghton
2022-04-28 16:20:34 +01:00
parent 210b772800
commit f3a412dd53
15 changed files with 11 additions and 118 deletions

View File

@@ -42,14 +42,9 @@ MainThreadRememberer rememberer;
using namespace swift;
using namespace threading_impl;
thread_id
swift::threading_impl::thread_get_main() {
return rememberer.main_thread();
}
bool
swift::threading_impl::thread_is_main() {
return pthread_equal(pthread_self(), thread_get_main());
return pthread_equal(pthread_self(), rememberer.main_thread());
}
void