Skip to content

Commit 28b2f25

Browse files
authored
Merge pull request #4698 from compnerd/tls-convention
Base: correct TLS handling on Windows x86
2 parents 2bad33d + c08773f commit 28b2f25

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

CoreFoundation/Base.subproj/CFPlatform.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,9 @@ typedef struct __CFTSDTable {
783783
tsdDestructor destructors[CF_TSD_MAX_SLOTS];
784784
} __CFTSDTable;
785785

786+
#if TARGET_OS_WIN32
787+
__stdcall
788+
#endif
786789
static void __CFTSDFinalize(void *arg);
787790

788791
#if TARGET_OS_WIN32
@@ -844,6 +847,9 @@ static void *__CFTSDGetSpecific() {
844847

845848
_Atomic(bool) __CFMainThreadHasExited = false;
846849

850+
#if TARGET_OS_WIN32
851+
__stdcall
852+
#endif
847853
static void __CFTSDFinalize(void *arg) {
848854
#if TARGET_OS_WASI
849855
__CFMainThreadHasExited = true;
@@ -1626,6 +1632,9 @@ typedef struct _CFThreadSpecificData {
16261632
} _CFThreadSpecificData;
16271633
#endif
16281634

1635+
#if TARGET_OS_WIN32
1636+
__stdcall
1637+
#endif
16291638
static void _CFThreadSpecificDestructor(void *ctx) {
16301639
#if TARGET_OS_WIN32
16311640
_CFThreadSpecificData *data = (_CFThreadSpecificData *)ctx;

0 commit comments

Comments
 (0)