File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,6 @@ void _stdlib_destroyTLS(void *);
23
23
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_API
24
24
void *_stdlib_createTLS(void );
25
25
26
- #if defined(_WIN32) && !defined(__CYGWIN__)
27
-
28
- typedef
29
- #if defined(_M_IX86)
30
- __stdcall
31
- #endif
32
- void (*__swift_thread_key_destructor)(void *);
33
-
34
26
static void
35
27
#if defined(_M_IX86)
36
28
__stdcall
@@ -39,6 +31,14 @@ destroyTLS_CCAdjustmentThunk(void *ptr) {
39
31
_stdlib_destroyTLS (ptr);
40
32
}
41
33
34
+ #if defined(_WIN32) && !defined(__CYGWIN__)
35
+
36
+ typedef
37
+ #if defined(_M_IX86)
38
+ __stdcall
39
+ #endif
40
+ void (*__swift_thread_key_destructor)(void *);
41
+
42
42
static inline int
43
43
_stdlib_thread_key_create (__swift_thread_key_t * _Nonnull key,
44
44
__swift_thread_key_destructor _Nullable destructor) {
@@ -83,9 +83,7 @@ _swift_stdlib_threadLocalStorageGet(void) {
83
83
static __swift_thread_key_t key;
84
84
85
85
SWIFT_ONCE_F (token, [](void *) {
86
- int result = SWIFT_THREAD_KEY_CREATE (&key, [](void *pointer) {
87
- _stdlib_destroyTLS (pointer);
88
- });
86
+ int result = SWIFT_THREAD_KEY_CREATE (&key, destroyTLS_CCAdjustmentThunk);
89
87
if (result != 0 )
90
88
swift::fatalError (0 , " couldn't create pthread key for stdlib TLS: %s\n " ,
91
89
std::strerror (result));
You can’t perform that action at this time.
0 commit comments