[Concurrency] Use pthread_specific for thread-local storage on Darwin.

The pthread_specific APIs are better than C++ thread_local storage on Darwin since we can use Swift's reserved pthread keys there.

rdar://79504652
This commit is contained in:
Mike Ash
2021-06-29 16:37:39 -04:00
parent f1ebf6c661
commit 190d3fd22e
7 changed files with 100 additions and 46 deletions

View File

@@ -13,9 +13,9 @@
#include <cstring>
#include "../SwiftShims/ThreadLocalStorage.h"
#include "../runtime/ThreadLocalStorage.h"
#include "swift/Basic/Lazy.h"
#include "swift/Runtime/Debug.h"
#include "swift/Runtime/ThreadLocalStorage.h"
SWIFT_CC(swift) SWIFT_RUNTIME_STDLIB_API
void _stdlib_destroyTLS(void *);