Skip to content
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

Switch IRQ handler's map from BTreeMap to array #29

Closed
Lurk opened this issue Oct 29, 2021 · 1 comment · Fixed by #35
Closed

Switch IRQ handler's map from BTreeMap to array #29

Lurk opened this issue Oct 29, 2021 · 1 comment · Fixed by #35

Comments

@Lurk
Copy link
Contributor

Lurk commented Oct 29, 2021

Grepped through the code, I found nice TODO:

use alloc::collections::BTreeMap;
// TODO: Use a simple array for faster access.
static IRQ_HANDLERS: SpinLock<BTreeMap<u8, Box<dyn FnMut() + Send + Sync>>> =

We want to have

[Option::<Box<dyn FnMut() + Send + Sync>>::None; 255] 

instead of

BTreeMap<u8, Box<dyn FnMut() + Send + Sync>>

as an IRQ handler's map.

If I get it right, I will make a pull request.

@nuta
Copy link
Owner

nuta commented Oct 29, 2021 via email

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 a pull request may close this issue.

2 participants