Skip to content

Conversation

reitermarkus
Copy link
Member

This implementation is wrong on multicore systems. Also, we want to implement the single-core implementation directly in the cortex-m crate, so we need to remove the circular dependency for that as well.

See rust-embedded/cortex-m#433.

@Dirbaio
Copy link
Member

Dirbaio commented May 6, 2022

Thanks for the PR!

Agreed the default impl is unsound. Removing it in 0.2 is breaking though.

I've pushed changes to main for an upcoming version 0.3 (or even 1.0?), where all builtin impls are removed, so that all impls are supplied by "target support" crates such as architecture crates (cortex-m, riscv), RTOS bindings, or HALs for multicore chips.

The new way is clearly the way to go in the long run. I think it'll be better to do this in a single clean breaking transition, so perhaps now's the time to do the jump.

@reitermarkus
Copy link
Member Author

I've pushed changes to main for an upcoming version 0.3 (or even 1.0?)

Thanks.

I think before 1.0 we should discuss whether CriticalSection should be moved to the critical_section crate or stay in bare_metal.

Personally I think it would make sense for the critical_section crate to also provide the type of the same name.

@Dirbaio
Copy link
Member

Dirbaio commented Jul 28, 2022

critical-section 1.0 (alpha released today) removes all builtin impls including cortex-m's, and defines the CriticalSection and Mutex types itself.

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.

2 participants