Unify lazy atomics in entropy backends#804
Conversation
newpavlov
left a comment
There was a problem hiding this comment.
I would prefer to keep the NonNull stuff.
7ad436c to
a52ff00
Compare
tamird
left a comment
There was a problem hiding this comment.
I would prefer to keep the
NonNullstuff.
Done.
There was a problem hiding this comment.
I think it's worth to split the lazy module to lazy_bool and lazy_ptr modules. It would allow us to remove the #![allow(dead_code)] part.
I also think it's fine to name LazyNonNull simply as LazyPtr and write proper docs for the structs since you no longer use macro to generate them.
650a3e6 to
2b471c5
Compare
|
@newpavlov I believe I've addressed all your comments. Does this LGTY? |
Replace ad-hoc atomic lazy caches with shared lazy helpers in the Linux/Android fallback, NetBSD, RDRAND, and RNDR backends. Add `LazyPtr` alongside `LazyUsize` and `LazyBool` so pointer and boolean caches use the same initialization contract. This reduces duplicated cache logic and keeps backend probing/fallback semantics aligned while preserving the existing retry-until-cached behavior.
2b471c5 to
e1e18ab
Compare
|
Yes, I think it more or less ready for merge. I want to give it one last look and push some doc-related changes in the following days. |
|
@tamird |
Replace ad-hoc atomic lazy caches with shared lazy helpers in the Linux/Android fallback, NetBSD, RDRAND, and RNDR backends. Add
LazyPtralongsideLazyUsizeandLazyBoolso pointer and boolean caches use the same initialization contract.This reduces duplicated cache logic and keeps backend probing/fallback semantics aligned while preserving the existing retry-until-cached behavior.