File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
CoreFoundation/Base.subproj Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -787,7 +787,6 @@ CF_EXPORT void _NS_pthread_setname_np(const char *name);
787787#endif
788788
789789#if DEPLOYMENT_TARGET_LINUX
790- CF_EXPORT Boolean _CFIsMainThread (void );
791790#define pthread_main_np _CFIsMainThread
792791#endif
793792
Original file line number Diff line number Diff line change @@ -243,6 +243,8 @@ CF_PRIVATE CF_EXPORT char *_Nullable *_Nonnull _CFEnviron(void);
243243
244244CF_EXPORT void CFLog1 (CFLogLevel lev , CFStringRef message );
245245
246+ CF_EXPORT Boolean _CFIsMainThread (void );
247+
246248_CF_EXPORT_SCOPE_END
247249
248250#endif /* __COREFOUNDATION_FORSWIFTFOUNDATIONONLY__ */
Original file line number Diff line number Diff line change 99
1010#if DEPLOYMENT_ENABLE_LIBDISPATCH
1111import Dispatch
12+ #if os(Linux)
13+ import CoreFoundation
14+ private func pthread_main_np( ) -> Int32 {
15+ return _CFIsMainThread ( ) ? 1 : 0
16+ }
17+ #endif
1218#endif
1319
1420public class NSOperation : NSObject {
You can’t perform that action at this time.
0 commit comments