revise Hermit's mutex interface to support the behaviour of StaticMutex#77610
revise Hermit's mutex interface to support the behaviour of StaticMutex#77610bors merged 13 commits intorust-lang:masterfrom
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
The behaviour shouldn't have changed. I only gave it a name. Using sys::(hermit::)Mutex like this (without .init() and .destroy()), was already done by all of Did #77147 specifically break something for you? Or was this already a problem before? |
|
I recognize the problem just after your commit. Maybe it was already there before. In my old approach, StaticMutex' are sometimes not correctly initialized. |
|
My fix to pass the format check was wrong. I fixed it and it works on my systems. |
rust-lang#77147 simplifies things by splitting this Mutex type into two types matching the two use cases: StaticMutex and MovableMutex. To support the behavior of StaticMutex, we move part of the mutex implementation into libstd.
|
Does |
|
My local version seems to work. After an update, std was broken. I fixed it with my latest commits |
|
The latest commit isn't related to the Mutex interface. The alloc crate provides now a new symbol |
the commit avoid an alignement issue in Mutex implementation
|
@m-ou-se When should I use By the way, the current version works and I created a docker container, which provide the nightly compiler for HermitCore. |
A Box should only be used there if a
That sounds like a type ( |
Good point, I will check it. |
No, that isn't the problem. I would say the current version is fine. @LukasKalbertodt If you like, you are able to review the PR. |
|
@dtolnay Do you have time to review the code? |
|
@bors r+ I did not review this in detail, as Hermit is a Tier 3 platform. |
|
📌 Commit bf268fe has been approved by |
…as-schievink Rollup of 12 pull requests Successful merges: - rust-lang#75115 (`#[deny(unsafe_op_in_unsafe_fn)]` in sys/cloudabi) - rust-lang#76614 (change the order of type arguments on ControlFlow) - rust-lang#77610 (revise Hermit's mutex interface to support the behaviour of StaticMutex) - rust-lang#77830 (Simplify query proc-macros) - rust-lang#77930 (Do not ICE with TraitPredicates containing [type error]) - rust-lang#78069 (Fix const core::panic!(non_literal_str).) - rust-lang#78072 (Cleanup constant matching in exhaustiveness checking) - rust-lang#78119 (Throw core::panic!("message") as &str instead of String.) - rust-lang#78191 (Introduce a temporary for discriminant value in MatchBranchSimplification) - rust-lang#78272 (const_evaluatable_checked: deal with unused nodes + div) - rust-lang#78318 (TyCtxt: generate single impl block with `slice_interners` macro) - rust-lang#78327 (resolve: Relax macro resolution consistency check to account for any errors) Failed merges: r? `@ghost`
#77147 simplifies things by splitting this Mutex type into two types matching the two use cases: StaticMutex and MovableMutex. To support the new behavior of StaticMutex, we move part of the mutex implementation into libstd.
The interface to the OS changed. Consequently, I removed a few functions, which aren't longer needed.