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

Remove stubs for atomics #45

Merged
merged 1 commit into from
Jan 3, 2022

Conversation

alessandrod
Copy link
Collaborator

(Pseudo) atomics are now implemented in SBF anza-xyz/llvm-project#23. The PR also enables atomic tests, and with those, now all core tests pass ✅

@@ -2770,16 +2670,7 @@ unsafe fn atomic_umin<T: Copy + crate::cmp::Ord>(dst: *mut T, val: T, _order: Or
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_diagnostic_item = "fence"]
#[cfg_attr(any(target_arch = "bpf", target_arch = "sbf", target_arch = "wasm32"), allow(unused_variables))]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this remain for target_arch = "wasm32"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Upstream doesn't seem to have it - is it something you somehow ran into? If it's something we added, it'd be great if we upstreamed it! But I don't think it makes much sense to keep it in our solana-* branches since we're not building wasm

Copy link
Collaborator

Choose a reason for hiding this comment

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

I didn't check upstream. I thought we had from upstream. In this case, sure, let's remove it altogether.

pub fn fence(order: Ordering) {
#[cfg(not(any(target_arch = "wasm32", target_arch = "bpf", target_arch = "sbf")))]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe keep the condition and comment for (not(target_arch = "wasm32"))?

(Pseudo) atomics are now implemented in SBF
anza-xyz/llvm-project#23
@alessandrod alessandrod merged commit 8e12c0c into anza-xyz:solana-1.56.0 Jan 3, 2022
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.

None yet

2 participants