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

Support AtomicCell<*64> arithmetics on targets that do not support Atomic*64 #767

Merged
merged 3 commits into from Jan 8, 2022

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Jan 8, 2022

This adds AtomicCell<{i,u}64>::{fetch_add,fetch_sub,fetch_and,fetch_or,fetch_xor} on targets that do not support Atomic{I,U}64.
This also adds AtomicCell<{i,u}128>::{fetch_add,fetch_sub,fetch_and,fetch_or,fetch_xor}.

These were provided in older versions of crossbeam-utils, but were unintentionally removed in 0.8.0 0.7.1 (11fbf05).

@taiki-e
Copy link
Member Author

taiki-e commented Jan 8, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Jan 8, 2022

Canceled.

@taiki-e
Copy link
Member Author

taiki-e commented Jan 8, 2022

bors r+

bors bot added a commit that referenced this issue Jan 8, 2022
767: Support AtomicCell<*64> arithmetics on targets that do not support Atomic*64 r=taiki-e a=taiki-e

This adds `AtomicCell<{i,u}64>::{fetch_add,fetch_sub,fetch_and,fetch_or,fetch_xor}` on targets that do not support `Atomic{I,U}64`.
This also adds `AtomicCell<{i,u}128>::{fetch_add,fetch_sub,fetch_and,fetch_or,fetch_xor}`.

These were provided in older versions of crossbeam-utils, but were unintentionally removed in 0.8.0 (11fbf05).

Co-authored-by: Taiki Endo <te316e89@gmail.com>
@taiki-e taiki-e force-pushed the atomic-cell-64-arithmetics branch from 9016759 to 3db81f9 Compare Jan 8, 2022
@bors
Copy link
Contributor

bors bot commented Jan 8, 2022

Canceled.

@taiki-e
Copy link
Member Author

taiki-e commented Jan 8, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Jan 8, 2022

Build succeeded:

@bors bors bot merged commit d77e702 into master Jan 8, 2022
20 checks passed
@bors bors bot deleted the atomic-cell-64-arithmetics branch Jan 8, 2022
bors bot added a commit that referenced this issue Jan 8, 2022
769: Prepare for the next release r=taiki-e a=taiki-e

- crossbeam-channel 0.5.1 -> 0.5.2
  - Fix stacked borrows violations. (#763, #764)
- crossbeam-epoch 0.9.5 -> 0.9.6
  - Add `Atomic::fetch_update`. (#706)
- crossbeam-queue 0.3.2 -> 0.3.3
  - Fix stacked borrows violation in `ArrayQueue`. (#763)
- crossbeam-utils 0.8.5 -> 0.8.6
  - Re-add `AtomicCell<{i,u}64>::{fetch_add,fetch_sub,fetch_and,fetch_or,fetch_xor}` that were accidentally removed in 0.8.0 on targets that do not support `Atomic{I,U}64`. (#767)
  - Re-add `AtomicCell<{i,u}128>::{fetch_add,fetch_sub,fetch_and,fetch_or,fetch_xor}` that were accidentally removed in 0.8.0. (#767)


Co-authored-by: Taiki Endo <te316e89@gmail.com>
bors bot added a commit that referenced this issue Jan 23, 2022
775: Add mips-unknown-linux-gnu to CI r=taiki-e a=taiki-e

Test 32-bit target that does not have AtomicU64/AtomicI64.

This also adds a test for the regression that #767 caught.

Co-authored-by: Taiki Endo <te316e89@gmail.com>
bors bot added a commit that referenced this issue Feb 5, 2022
781: Fix unsoundness of AtomicCell<*64> arithmetics on 32-bit targets that support Atomic*64 r=taiki-e a=taiki-e

The alignment of u64/i64 on a 32-bit target can be smaller than AtomicU64/AtomicI64.

32-bit targets without Atomic*64 (#767) and 64-bit targets are not affected by this issue.

Co-authored-by: Taiki Endo <te316e89@gmail.com>
bors bot added a commit that referenced this issue Feb 5, 2022
781: Fix unsoundness of AtomicCell<*64> arithmetics on 32-bit targets that support Atomic*64 r=taiki-e a=taiki-e

The alignment of u64/i64 on a 32-bit target can be smaller than AtomicU64/AtomicI64.

32-bit targets without Atomic*64 (#767) and 64-bit targets are not affected by this issue.

Co-authored-by: Taiki Endo <te316e89@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

1 participant