-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib] Implement Mutex in Synchronization #71383
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the Linux futex code is slightly wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I think we do want to cache the thread ID on Linux if we can. (The Linux pthreads implementation caches it too, FWIW.)
@swift-ci please smoke test |
@swift-ci test webassembly |
@swift-ci please build toolchain macOS |
@swift-ci please smoke test |
@swift-ci please smoke test webassembly |
@swift-ci please test webassembly |
@swift-ci please smoke test |
@swift-ci please test webassembly |
@swift-ci please build toolchain macOS |
@swift-ci please test webassembly |
@swift-ci please test |
@swift-ci please build toolchain |
@swift-ci please test |
@swift-ci please test webassembly |
dd27d6a
to
fa5248b
Compare
@swift-ci please test |
@swift-ci please build toolchain |
@swift-ci please test webassembly |
@swift-ci please test |
fix some stuff
Fix some compile issues
@swift-ci please test |
[stdlib] Implement Mutex in Synchronization
@Azoy, is this supposed to work on 32-bit ARM? This pull crashes the trunk compiler when building for Android armv7 on my daily CI, though it builds fine for AArch64 and x86_64:
|
This patch adds a new primitive in the Synchronization module,
Mutex
, which is a wrapper over a platform's implementation.