Skip to content

[Threading] Use raw gettid syscall for older glibc compatibility #59220

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

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented Jun 2, 2022

gettid wrapper was added in glibc 2.30, and Ubuntu 18.04 uses glibc 2.27, so use raw syscall instead of it.

This fixes Ubuntu 18.04 build failure: https://ci.swift.org/job/oss-swift-package-ubuntu-18_04/552/

`gettid` wrapper was added in glibc 2.30, and Ubuntu 18.04 uses glibc
2.27, so use raw syscall instead of it.
@kateinoigakukun kateinoigakukun requested a review from al45tair June 2, 2022 06:28
@kateinoigakukun
Copy link
Member Author

@swift-ci Please smoke test

@kateinoigakukun
Copy link
Member Author

@swift-ci Please test Ubuntu 18.04 platform

Copy link
Contributor

@al45tair al45tair left a comment

Choose a reason for hiding this comment

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

The original PR has been reverted for now because of this and some simulator problems. But thank-you for this fix — it'll go into a revised PR fairly soon.

@al45tair al45tair requested a review from ahoppen June 2, 2022 09:09
@al45tair
Copy link
Contributor

al45tair commented Jun 2, 2022

Sounds like we might be able to avoid reverting, in which case we'll pull this in to fix the gettid() issue. Thanks again for the fix :-)

@kateinoigakukun
Copy link
Member Author

It's fine to me in both cases 👍 Thanks for handling.

@ahoppen ahoppen merged commit 58081c8 into swiftlang:main Jun 2, 2022
@kateinoigakukun kateinoigakukun deleted the katei/dont-use-gettid-wrapper branch June 2, 2022 14:52
ahoppen added a commit to ahoppen/swift that referenced this pull request Jun 2, 2022
…/dont-use-gettid-wrapper"

This reverts commit 58081c8, reversing
changes made to 94c9ce6.
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