Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FreeBSD] Enable CFRunLoop support #5188

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

michael-yuji
Copy link
Contributor

This patch enables CFRunLoop for FreeBSD.
Related libdispatch PR: swiftlang/swift-corelibs-libdispatch#861

@@ -72,7 +72,7 @@ extern bool _dispatch_runloop_root_queue_perform_4CF(dispatch_queue_t queue);

#if TARGET_OS_MAC
typedef mach_port_t dispatch_runloop_handle_t;
#elif defined(__linux__) || defined(__FreeBSD__)
#elif defined(__linux__)
typedef int dispatch_runloop_handle_t;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that there is a type mismatch here which could truncate the value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing || defined(__FreeBSD__) here makes dispatch_runloop_handle_t type alias to 'uint64_t' (line 80), which fallback to the generic unix implementation.

Currently, although the runloop handle type is defined for FreeBSD, it is not doing anything useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants