Skip to content

Commit 82f431b

Browse files
committed
Base: use windows primitives for threading on Win32
Update the type definitions to use the native windows threading primitives on Windows targets
1 parent e1b38fb commit 82f431b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

CoreFoundation/Base.subproj/ForSwiftFoundationOnly.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,15 @@ CF_EXPORT char *_Nullable *_Nonnull _CFEnviron(void);
345345

346346
CF_EXPORT void CFLog1(CFLogLevel lev, CFStringRef message);
347347

348-
typedef pthread_attr_t _CFThreadAttributes;
348+
#if DEPLOYMENT_TARGET_WINDOWS
349+
typedef HANDLE _CFThreadRef;
350+
typedef DWORD _CFThreadAttributes;
351+
typedef DWORD _CFThreadSpecificKey;
352+
#elif _POSIX_THREADS
349353
typedef pthread_t _CFThreadRef;
354+
typedef pthread_attr_t _CFThreadAttributes;
350355
typedef pthread_key_t _CFThreadSpecificKey;
356+
#endif
351357

352358
CF_CROSS_PLATFORM_EXPORT Boolean _CFIsMainThread(void);
353359
CF_EXPORT _CFThreadRef _CFMainPThread;

0 commit comments

Comments
 (0)