8000 kernel: utilities: add crc32_posix by bradjc · Pull Request #3829 · tock/tock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

kernel: utilities: add crc32_posix #3829

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

Merged
merged 1 commit into from
Feb 8, 2024
Merged

kernel: utilities: add crc32_posix #3829

merged 1 commit into from
Feb 8, 2024

Conversation

bradjc
Copy link
Contributor
@bradjc bradjc commented Feb 1, 2024

Pull Request Overview

This is for computing short IDs from process names. Follow up to #3825.

More information here: #3825

This CRC matches the CRC TicKV uses.

Testing Strategy

The online calculator compared to tickv.

TODO or Help Wanted

n/a

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

/// Compute a POSIX-style CRC32 checksum of a slice.
///
/// Online calculator: <https://crccalc.com/>
pub fn crc32_posix(b: &[u8]) -> u32 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add unit tests. Otherwise this looks good to me

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree unit tests would be nice, but this seems like a function of relatively low complexity. I wouldn't want to block this PR on that.

@bradjc
Copy link
Contributor Author
bradjc commented Feb 8, 2024

Can we merge this?

@lschuermann lschuermann added this pull request to the merge queue Feb 8, 2024
Merged via the queue into master with commit ad49a3a Feb 8, 2024
@lschuermann lschuermann deleted the crc32-posix branch February 8, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0