Skip to content

Commit

Permalink
use 128 cache align for m1 mac
Browse files Browse the repository at this point in the history
  • Loading branch information
LYF1999 committed Jun 1, 2022
1 parent 6f481f8 commit 1446bce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/std/src/sync/mpsc/cache_aligned.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use crate::ops::{Deref, DerefMut};

#[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(align(64))]
#[cfg_attr(target_arch = "aarch64", repr(align(128)))]
#[cfg_attr(not(target_arch = "aarch64"), repr(align(64)))]
pub(super) struct CacheAligned<T>(pub T);

impl<T> Deref for CacheAligned<T> {
Expand Down

0 comments on commit 1446bce

Please sign in to comment.