Skip to content

Commit 57e1a42

Browse files
committed
std: move Once implementations to sys
1 parent 3b85d2c commit 57e1a42

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+21
-34
lines changed

library/std/src/sync/condvar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ mod tests;
33

44
use crate::fmt;
55
use crate::sync::{mutex, poison, LockResult, MutexGuard, PoisonError};
6-
use crate::sys::locks as sys;
6+
use crate::sys::sync as sys;
77
use crate::time::{Duration, Instant};
88

99
/// A type indicating whether a timed wait on a condition variable returned

library/std/src/sync/mutex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::mem::ManuallyDrop;
88
use crate::ops::{Deref, DerefMut};
99
use crate::ptr::NonNull;
1010
use crate::sync::{poison, LockResult, TryLockError, TryLockResult};
11-
use crate::sys::locks as sys;
11+
use crate::sys::sync as sys;
1212

1313
/// A mutual exclusion primitive useful for protecting shared data
1414
///

library/std/src/sync/once.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod tests;
88

99
use crate::fmt;
1010
use crate::panic::{RefUnwindSafe, UnwindSafe};
11-
use crate::sys_common::once as sys;
11+
use crate::sys::sync as sys;
1212

1313
/// A synchronization primitive which can be used to run a one-time global
1414
/// initialization. Useful for one-time initialization for FFI or related

library/std/src/sync/reentrant_lock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::fmt;
66
use crate::ops::Deref;
77
use crate::panic::{RefUnwindSafe, UnwindSafe};
88
use crate::sync::atomic::{AtomicUsize, Ordering::Relaxed};
9-
use crate::sys::locks as sys;
9+
use crate::sys::sync as sys;
1010

1111
/// A re-entrant mutual exclusion lock
1212
///

library/std/src/sync/rwlock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::mem::ManuallyDrop;
88
use crate::ops::{Deref, DerefMut};
99
use crate::ptr::NonNull;
1010
use crate::sync::{poison, LockResult, TryLockError, TryLockResult};
11-
use crate::sys::locks as sys;
11+
use crate::sys::sync as sys;
1212

1313
/// A reader-writer lock
1414
///

library/std/src/sys/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ mod pal;
66
mod personality;
77

88
pub mod cmath;
9-
pub mod locks;
109
pub mod os_str;
1110
pub mod path;
11+
pub mod sync;
1212
#[allow(dead_code)]
1313
#[allow(unused_imports)]
1414
pub mod thread_local;

library/std/src/sys/pal/teeos/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ pub mod fs;
1919
#[path = "../unsupported/io.rs"]
2020
pub mod io;
2121
pub mod net;
22-
#[path = "../unsupported/once.rs"]
23-
pub mod once;
2422
pub mod os;
2523
#[path = "../unsupported/pipe.rs"]
2624
pub mod pipe;

library/std/src/sys/pal/uefi/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ pub mod fs;
2121
pub mod io;
2222
#[path = "../unsupported/net.rs"]
2323
pub mod net;
24-
#[path = "../unsupported/once.rs"]
25-
pub mod once;
2624
pub mod os;
2725
#[path = "../unsupported/pipe.rs"]
2826
pub mod pipe;

library/std/src/sys/pal/unsupported/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ pub mod env;
66
pub mod fs;
77
pub mod io;
88
pub mod net;
9-
pub mod once;
109
pub mod os;
1110
pub mod pipe;
1211
pub mod process;

library/std/src/sys/pal/wasi/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ pub mod time;
4141

4242
cfg_if::cfg_if! {
4343
if #[cfg(not(target_feature = "atomics"))] {
44-
#[path = "../unsupported/once.rs"]
45-
pub mod once;
4644
#[path = "../unsupported/thread_parking.rs"]
4745
pub mod thread_parking;
4846
}

0 commit comments

Comments
 (0)