Skip to content
New issue

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

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

Already on GitHub? # to your account

Make Peripherals::steal() zero cost #356

Open
Dirbaio opened this issue Oct 16, 2021 · 1 comment
Open

Make Peripherals::steal() zero cost #356

Dirbaio opened this issue Oct 16, 2021 · 1 comment

Comments

@Dirbaio
Copy link
Member

Dirbaio commented Oct 16, 2021

Peripherals::steal() has a write to a static mut:

TAKEN = true;

I expected it to be zero-cost, just constructing and returning the Peripherals which is a noop since it is ZST. This was a bit surprising.

@adamgreig
Copy link
Member

cc #186

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants