rust-embedded / bare-metal

Abstractions common to microcontrollers
Apache License 2.0
116 stars 17 forks source link

Add `#[inline(always)]` to CriticalSection::new(). #19

Closed m-ou-se closed 4 years ago

m-ou-se commented 5 years ago

This is the only non-generic function in this crate. Rustc doesn't inline non-generic functions across crate boundaries, so without #[inline], this trivial function would still end up taking space and cpu time in crates that use this, even though it does literally nothing at runtime.

therealprof commented 4 years ago

bors r=jonas-schievink