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] support FreeBSD #861

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

michael-yuji
Copy link

This patch adds FreeBSD support to libdispatch.

This patch is partly based on #561 with bug fixes and uses the pipe based mechanism based on #559 to bridge with CFRunLoop, since part of the CFRunLoop changes already landed in CoreFoundation.

In addition to above changes, also implements workqueue and limited DispatchSource support.

@@ -27,6 +27,8 @@ function(get_swift_host_arch result_var_name)
set("${result_var_name}" "armv7" PARENT_SCOPE)
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "armv7l")
set("${result_var_name}" "armv7" PARENT_SCOPE)
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64")
set("${result_var_name}" "x86_64" PARENT_SCOPE)
Copy link
Member

Choose a reason for hiding this comment

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

Depending on land order - I think that #860 should obviate/clean up this part.

typedef int dispatch_runloop_handle_t;
#elif defined(__FreeBSD__)
typedef uint64_t 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.

Should this be uint64_t or uintptr_t? (i.e. is the handle pointer shaped or an integer shaped value?)

Copy link
Author

Choose a reason for hiding this comment

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

this will be an integer shaped value. This is used to adopt the pipe based mechanism to bridge between Foundation swiftlang/swift-corelibs-foundation#3004

@3405691582 3405691582 mentioned this pull request Mar 30, 2025
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