File tree Expand file tree Collapse file tree 3 files changed +23
-333
lines changed Expand file tree Collapse file tree 3 files changed +23
-333
lines changed Original file line number Diff line number Diff line change @@ -249,11 +249,7 @@ const char *_CFProcessPath(void) {
249
249
250
250
#if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_BSD
251
251
CF_CROSS_PLATFORM_EXPORT Boolean _CFIsMainThread (void ) {
252
- #if defined(__OpenBSD__ )
253
- return pthread_equal (pthread_self (), _CFMainPThread ) != 0 ;
254
- #else
255
252
return pthread_main_np () == 1 ;
256
- #endif
257
253
}
258
254
#endif
259
255
@@ -778,7 +774,7 @@ static void __CFTSDFinalize(void *arg) {
778
774
#if TARGET_OS_WASI
779
775
__CFMainThreadHasExited = true;
780
776
#else
781
- if (_CFIsMainThread () ) {
777
+ if (pthread_main_np () == 1 ) {
782
778
// Important: we need to be sure that the only time we set this flag to true is when we actually can guarentee we ARE the main thread.
783
779
__CFMainThreadHasExited = true;
784
780
}
You can’t perform that action at this time.
0 commit comments