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

Use portable-atomic when AtomicU64 is not available. #233

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

flaviojs
Copy link

@flaviojs flaviojs commented Jan 9, 2025

Summary of the PR

Use portable-atomic when AtomicU64 is not available.
Fixes #187

I do not know if AtomicU64 is required, or why other atomic types don't implement Metric.
If it is not required, an alternate change is to use the more portable AtomicUsize.

It is unclear if the changes to test linux::sock_ctrl_msg::tests::buffer_lenare appropriate since I don't use this crate.

All tests pass in my 32-bit OS except the doc-tests linux::ioctl::ioctl and linux::ioctl::ioctl_with_val.
These failures are expected because I don't have /dev/kvm.

I do not know what should go into the changelog so I left it unchanged.

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

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 this pull request may close these issues.

Allow building on 32bit platforms without AtomicU64
1 participant