Skip to content

[FreeBSD]: Optional observation pthread primitives #81366

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

Merged

Conversation

etcwilde
Copy link
Member

@etcwilde etcwilde commented May 7, 2025

The pthread APIs on FreeBSD do not include nullability APIs so the pthread mutex APIs are imported as pointers to optional values. Other platforms include nullability APIs and import the pthread APIs as pointers to the mutex. Splitting the locking primitive type based on the OS.

Fixes: rdar://150880976

@etcwilde etcwilde requested a review from phausler as a code owner May 7, 2025 21:43
@etcwilde
Copy link
Member Author

etcwilde commented May 7, 2025

@swift-ci please test

@stephentyrone
Copy link
Contributor

Longer-term, should we be API-noting these on *BSD?

@etcwilde
Copy link
Member Author

etcwilde commented May 9, 2025

Longer-term, should we be API-noting these on *BSD?

Seems like a reasonable change. That would be part of a *BSD platform overlay, I think. #81407

@etcwilde etcwilde force-pushed the ewilde/observe-freebsd-pthread-nullability branch from 02faea6 to 4c07b9c Compare May 9, 2025 17:07
The pthread APIs on FreeBSD do not include nullability APIs so the
pthread mutex APIs are imported as pointers to optional values.
Other platforms include nullability APIs and import the pthread APIs as
pointers to the mutex. Splitting the locking primitive type based on the
OS.

Fixes: rdar://150880976
@etcwilde etcwilde force-pushed the ewilde/observe-freebsd-pthread-nullability branch from 4c07b9c to 1a546a9 Compare May 9, 2025 17:08
@etcwilde
Copy link
Member Author

etcwilde commented May 9, 2025

@swift-ci please smoke test

@etcwilde etcwilde merged commit c992957 into swiftlang:main May 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants