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

timer: use our own AtomicU64 on targets with target_has_atomic less than 64 #1538

Merged
merged 4 commits into from
Sep 13, 2019
Merged

timer: use our own AtomicU64 on targets with target_has_atomic less than 64 #1538

merged 4 commits into from
Sep 13, 2019

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Sep 4, 2019

Motivation

Fixes #1421 (comment)

Solution

Reverts part of #1421.

@seirdb
Copy link

seirdb commented Sep 6, 2019

It would be nice if this was handled in the std crate. Is there a reason it’s not tackled there?

@taiki-e
Copy link
Member Author

taiki-e commented Sep 6, 2019

@seirdb

Is there a reason it’s not tackled there?

This is difficult because Atomic* are defined in core, but Mutex is defined in std.

@seirdb
Copy link

seirdb commented Sep 6, 2019

Oh right, makes sense then..


pub(crate) use self::imp::AtomicU64;

#[cfg(target_pointer_width = "64")]
Copy link
Member Author

Choose a reason for hiding this comment

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

This needs to be #[cfg(target_has_atomic = "64")], not #[cfg(target_pointer_width = "64")], but since feature(cfg_target_has_atomic) is not stable, will use an alternative.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in 3e86b76

displayName: Check source

- script: cargo check --tests --all --exclude tokio-tls --target ${{ parameters.target }}
displayName: Check tests
# - script: cross check --tests --all --exclude tokio-tls --target $(target)
Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -1,27 +1,41 @@
jobs:
- job: ${{ parameters.name }}
displayName: ${{ parameters.displayName }}
strategy:
matrix:
Copy link
Member Author

Choose a reason for hiding this comment

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

@taiki-e taiki-e changed the title timer: use our own AtomicU64 on 32-bit platforms timer: use our own AtomicU64 on targets with target_has_atomic less than 64 Sep 8, 2019
Copy link
Member

@carllerche carllerche left a comment

Choose a reason for hiding this comment

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

Thanks 👍

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.

3 participants