Skip to content

Allow #[naked] attribute on interrupt handlers and pre_init #421

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 7, 2022

Conversation

adamgreig
Copy link
Member

Might be useful for pre_init especially, now that constrained naked functions are hopefully on the road to being stable.

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

@adamgreig adamgreig requested a review from a team as a code owner February 3, 2022 20:13
@rust-highfive
Copy link

r? @thalesfragoso

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-cortex-m labels Feb 3, 2022
Copy link
Member

@thalesfragoso thalesfragoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks again!

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 7, 2022

@bors bors bot merged commit 8bb2a61 into master Feb 7, 2022
@bors bors bot deleted the naked-pre-init branch February 7, 2022 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-cortex-m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants