-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[WebAssembly] Add no-op MutexWASI.h implementation #29459
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
@jrose-apple @stephentyrone @tbkka would any of you be available for a review please? Otherwise should I request it from anyone else? Thanks! |
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 with a small change to the comment.
include/swift/Runtime/MutexWASI.h
Outdated
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// Stub implementation of Mutex, ConditionVariable, Read/Write lock, and Scoped |
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.
s/stub/no-op/
I wouldn't say "no concrete implementation is provided" because it is a concrete implementation, it just does not perform locking.
"No-op implementation of locks for the WebAssembly System Interface. The implementation does not need to perform locking, because as of <insert WebAssembly spec version, or today's date> WebAssembly does not support threads."
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!
@swift-ci Please smoke test |
@gribozavr could you trigger a CI run here? Thank you! |
@swift-ci Please smoke test |
@gribozavr I don't think |
@swift-ci please smoke test Linux platform |
@MaxDesiatov in the future, please keep fixups to the change in a single commit in the future. |
Since WebAssembly doesn't support threading, no locking is done in runtime. This PR adds a no-op implementation in
MutexWASI.h
to improve compatibility with WASI.This is a part of SR-9307 and #24684.
(cc @kateinoigakukun @zhuowei)