-
Notifications
You must be signed in to change notification settings - Fork 240
Simplify atomics using lazy
#759
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
base: master
Are you sure you want to change the base?
Conversation
09f7584 to
3a40345
Compare
| #[allow(dead_code, reason = "not used in all backends")] | ||
| mod error; | ||
| #[allow(dead_code, reason = "not used in all backends")] | ||
| mod lazy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't unconditionally include lazy. It will cause breakage on platforms without AtomicUsize.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which platorms, please? Are they not included in CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, well it used to be the riscv32imc platforms (which do not have atomics). However, for some reason lazy.rs is building, even on a target like riscv32imc-unknown-none-elf which definitely doesn't have atomics. I'll investigate furthur.
| use core::mem::MaybeUninit; | ||
|
|
||
| mod backends; | ||
| #[allow(dead_code, reason = "not used in all backends")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this, we only want #[allow(dead_code)] on certain methods in the error module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are only two pub (crate) items on the error module and prior to this change they are both marked allow(dead_code). Which methods do you not want this on?
320758f to
d22e6e5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not convinced that we should "simplify" the NetBSD backend by reusing the lazy module. The current code is fairly straightforward and self-contained, I don't see significant issues with it.
This PR also introduces a lot of other IMO unnecessary changes out of scope for the purpose declared in the PR title.
65f8e51 to
db0767e
Compare
|
Sure, I can break it up into more PRs if you folks prefer. I was just looking for ways to make things a bit more neat. Anyway, I used a macro to introduce |
db0767e to
0e346f3
Compare
0e346f3 to
c0f53bf
Compare
No description provided.