Skip to content

Conversation

@tana
Copy link

@tana tana commented May 5, 2023

This PR replaces an interruption-free section inside Peripherals::take() with more generic critical section using critical_section crate.

Critical sections implemented with just disabling interrupts are unsound on multicore environments, because other core can still modify data.
critical_section crate can mitigate this problem because it can be implemented in multicore-safe way, as in rp2040-hal.

Also, it improves compatibility with newer, unreleased version of cortex-m which has different signature of interrupt::free.

@tana
Copy link
Author

tana commented May 8, 2023

This PR is closed because this problem is already addressed in svd2rust.
Sorry for the inconvenience.

@tana tana closed this May 8, 2023
@tana
Copy link
Author

tana commented May 8, 2023

This PR is closed because this problem is already addressed in svd2rust.
Sorry for the inconvenience.

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.

1 participant