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
kernel: structs: define priq bitmap size via bits per long #72626
kernel: structs: define priq bitmap size via bits per long #72626
Conversation
I think this is not enough. If you are changing this to a long, you
should also change the actual bitmap type to a long in `struct _priq_mq`
to match.
|
Correct - let me fix that. |
Since a long is 64-bits on 64-bit architectures, and 32-bits on 32-bit architectures, we can simplify the definition of PRIQ_BITMAP_SIZE by defining it in terms of BITS_PER_LONG. Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
242a649
to
28b9081
Compare
@npitre - Fixed! |
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.
Seems clean. Though pedants will point out that "long" is in fact 32 bits on x86_64 Windows toolchains for compatibility, leading to suboptimal code if someone ever gets the urge to try to build Zephyr with MSVC.
That would be something 😅 I had considered using |
Since a long is 64-bits on 64-bit architectures, and 32-bits on 32-bit architectures, we can simplify the definition of
PRIQ_BITMAP_SIZE
by defining it in terms ofBITS_PER_LONG
.