[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

@@ -64,14 +64,9 @@ C11ThreadingHelper helper;
using namespace swift;
using namespace threading_impl;
thread_id
swift::threading_impl::thread_get_main() {
return helper.main_thread();
}
bool
swift::threading_impl::thread_is_main() {
return thrd_equal(thrd_current(), thread_get_main());
return thrd_equal(thrd_current(), helper.main_thread());
}
void