Skip to content

Commit 8bb2a61

Browse files
bors[bot]adamgreig
andauthored
Merge #421
421: Allow #[naked] attribute on interrupt handlers and pre_init r=thalesfragoso a=adamgreig Might be useful for `pre_init` especially, now that constrained naked functions are hopefully [on the road to being stable](rust-lang/rust#90957). `pre_init` and `entry` are called from our `asm.S` via `bl __pre_init` and `bl main`, exception and interrupt handlers are called directly by the CPU; in either case there's no issue with calling a naked function. Inspired by https://twitter.com/the6p4c/status/1489266955232034817 Co-authored-by: Adam Greig <[email protected]>
2 parents 70b4d4c + d6a69fe commit 8bb2a61

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cortex-m-rt/macros/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,7 @@ fn check_attr_whitelist(attrs: &[Attribute], caller: WhiteListCaller) -> Result<
612612
"deny",
613613
"forbid",
614614
"cold",
615+
"naked",
615616
];
616617

617618
'o: for attr in attrs {

0 commit comments

Comments
 (0)