Skip to content

Conversation

@jbeaurivage
Copy link
Contributor

Summary

According to this discussion, it seems core::sync::atomic::{fence, compiler_fence} aren't a strong guarantee that the compiler won't reorder memory accesses beyond the fence. The suggested fix is to add an inline assembly call, which apparently guarantees there won't be any memory accesses beyond the asm call.

@rnd-ash
Copy link
Contributor

rnd-ash commented Jan 28, 2026

Looks good @jbeaurivage , but maybe, its best to put the fence functions near the crate root for future use by other peripherals should we need to in future? - Or is this specific to DMAC?

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