Skip to content

Commit cf9d303

Browse files
authored
Revert "Omnibus to implement CFRunLoop with kevent. (#3004)"
This reverts commit 5f57e70.
1 parent 1136a6e commit cf9d303

File tree

3 files changed

+23
-333
lines changed

3 files changed

+23
-333
lines changed

CoreFoundation/Base.subproj/CFPlatform.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,7 @@ const char *_CFProcessPath(void) {
249249

250250
#if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_BSD
251251
CF_CROSS_PLATFORM_EXPORT Boolean _CFIsMainThread(void) {
252-
#if defined(__OpenBSD__)
253-
return pthread_equal(pthread_self(), _CFMainPThread) != 0;
254-
#else
255252
return pthread_main_np() == 1;
256-
#endif
257253
}
258254
#endif
259255

@@ -778,7 +774,7 @@ static void __CFTSDFinalize(void *arg) {
778774
#if TARGET_OS_WASI
779775
__CFMainThreadHasExited = true;
780776
#else
781-
if (_CFIsMainThread()) {
777+
if (pthread_main_np() == 1) {
782778
// 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.
783779
__CFMainThreadHasExited = true;
784780
}

0 commit comments

Comments
 (0)