Skip to content

Commit b611f99

Browse files
committed
---
yaml --- r: 349458 b: refs/heads/master-next c: f2c980c h: refs/heads/master
1 parent 26e592a commit b611f99

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3-
refs/heads/master-next: 61ec1fb4a6ef89b62c107fd5292c291ad51b2c8b
3+
refs/heads/master-next: f2c980c9093d3fa0a040ca8f45a23a346c6b8fb5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/stdlib/public/stubs/ThreadLocalStorage.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ void _stdlib_destroyTLS(void *);
2323
SWIFT_CC(swift) SWIFT_RUNTIME_STDLIB_API
2424
void *_stdlib_createTLS(void);
2525

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-
3426
static void
3527
#if defined(_M_IX86)
3628
__stdcall
@@ -39,6 +31,14 @@ destroyTLS_CCAdjustmentThunk(void *ptr) {
3931
_stdlib_destroyTLS(ptr);
4032
}
4133

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+
4242
static inline int
4343
_stdlib_thread_key_create(__swift_thread_key_t * _Nonnull key,
4444
__swift_thread_key_destructor _Nullable destructor) {
@@ -83,9 +83,7 @@ _swift_stdlib_threadLocalStorageGet(void) {
8383
static __swift_thread_key_t key;
8484

8585
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);
8987
if (result != 0)
9088
swift::fatalError(0, "couldn't create pthread key for stdlib TLS: %s\n",
9189
std::strerror(result));

0 commit comments

Comments
 (0)