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

chore: use std::AtomicPtr and std::AtomicU8 #5071

Merged
merged 4 commits into from Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 0 additions & 34 deletions tokio/src/loom/std/atomic_ptr.rs

This file was deleted.

2 changes: 1 addition & 1 deletion tokio/src/loom/std/atomic_u16.rs
Expand Up @@ -2,7 +2,7 @@ use std::cell::UnsafeCell;
use std::fmt;
use std::ops::Deref;

/// `AtomicU16` providing an additional `load_unsync` function.
/// `AtomicU16` providing an additional `unsync_load` function.
pub(crate) struct AtomicU16 {
inner: UnsafeCell<std::sync::atomic::AtomicU16>,
}
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/loom/std/atomic_u32.rs
Expand Up @@ -2,7 +2,7 @@ use std::cell::UnsafeCell;
use std::fmt;
use std::ops::Deref;

/// `AtomicU32` providing an additional `load_unsync` function.
xudong963 marked this conversation as resolved.
Show resolved Hide resolved
/// `AtomicU32` providing an additional `unsync_load` function.
pub(crate) struct AtomicU32 {
inner: UnsafeCell<std::sync::atomic::AtomicU32>,
}
Expand Down
34 changes: 0 additions & 34 deletions tokio/src/loom/std/atomic_u8.rs

This file was deleted.

2 changes: 1 addition & 1 deletion tokio/src/loom/std/atomic_usize.rs
Expand Up @@ -2,7 +2,7 @@ use std::cell::UnsafeCell;
use std::fmt;
use std::ops;

/// `AtomicUsize` providing an additional `load_unsync` function.
/// `AtomicUsize` providing an additional `unsync_load` function.
pub(crate) struct AtomicUsize {
inner: UnsafeCell<std::sync::atomic::AtomicUsize>,
}
Expand Down
6 changes: 1 addition & 5 deletions tokio/src/loom/std/mod.rs
@@ -1,10 +1,8 @@
#![cfg_attr(any(not(feature = "full"), loom), allow(unused_imports, dead_code))]

mod atomic_ptr;
mod atomic_u16;
mod atomic_u32;
mod atomic_u64;
mod atomic_u8;
mod atomic_usize;
mod mutex;
#[cfg(feature = "parking_lot")]
Expand Down Expand Up @@ -71,14 +69,12 @@ pub(crate) mod sync {
pub(crate) use crate::loom::std::mutex::Mutex;

pub(crate) mod atomic {
pub(crate) use crate::loom::std::atomic_ptr::AtomicPtr;
pub(crate) use crate::loom::std::atomic_u16::AtomicU16;
pub(crate) use crate::loom::std::atomic_u32::AtomicU32;
pub(crate) use crate::loom::std::atomic_u64::AtomicU64;
pub(crate) use crate::loom::std::atomic_u8::AtomicU8;
pub(crate) use crate::loom::std::atomic_usize::AtomicUsize;

pub(crate) use std::sync::atomic::{fence, AtomicBool, Ordering};
pub(crate) use std::sync::atomic::{fence, AtomicBool, AtomicPtr, AtomicU8, Ordering};
}
}

Expand Down