mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
std: move locks to sys
on platforms without threads
This commit is contained in:
parent
f77c4d57fc
commit
21fef03da2
@ -29,5 +29,8 @@ cfg_if::cfg_if! {
|
||||
} else if #[cfg(target_os = "xous")] {
|
||||
mod xous;
|
||||
pub use xous::Condvar;
|
||||
} else {
|
||||
mod no_threads;
|
||||
pub use no_threads::Condvar;
|
||||
}
|
||||
}
|
||||
|
@ -31,5 +31,8 @@ cfg_if::cfg_if! {
|
||||
} else if #[cfg(target_os = "xous")] {
|
||||
mod xous;
|
||||
pub use xous::Mutex;
|
||||
} else {
|
||||
mod no_threads;
|
||||
pub use no_threads::Mutex;
|
||||
}
|
||||
}
|
||||
|
@ -29,5 +29,8 @@ cfg_if::cfg_if! {
|
||||
} else if #[cfg(target_os = "xous")] {
|
||||
mod xous;
|
||||
pub use xous::RwLock;
|
||||
} else {
|
||||
mod no_threads;
|
||||
pub use no_threads::RwLock;
|
||||
}
|
||||
}
|
||||
|
@ -19,8 +19,6 @@ pub mod env;
|
||||
pub mod fs;
|
||||
#[path = "../unsupported/io.rs"]
|
||||
pub mod io;
|
||||
#[path = "../unsupported/locks/mod.rs"]
|
||||
pub mod locks;
|
||||
#[path = "../unsupported/net.rs"]
|
||||
pub mod net;
|
||||
#[path = "../unsupported/once.rs"]
|
||||
|
@ -1,6 +0,0 @@
|
||||
mod condvar;
|
||||
mod mutex;
|
||||
mod rwlock;
|
||||
pub use condvar::Condvar;
|
||||
pub use mutex::Mutex;
|
||||
pub use rwlock::RwLock;
|
@ -5,7 +5,6 @@ pub mod args;
|
||||
pub mod env;
|
||||
pub mod fs;
|
||||
pub mod io;
|
||||
pub mod locks;
|
||||
pub mod net;
|
||||
pub mod once;
|
||||
pub mod os;
|
||||
|
@ -43,10 +43,7 @@ pub mod thread_local_key;
|
||||
pub mod time;
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(target_feature = "atomics")] {
|
||||
} else {
|
||||
#[path = "../unsupported/locks/mod.rs"]
|
||||
pub mod locks;
|
||||
if #[cfg(not(target_feature = "atomics"))] {
|
||||
#[path = "../unsupported/once.rs"]
|
||||
pub mod once;
|
||||
#[path = "../unsupported/thread_parking.rs"]
|
||||
|
@ -48,8 +48,6 @@ cfg_if::cfg_if! {
|
||||
#[path = "atomics/thread.rs"]
|
||||
pub mod thread;
|
||||
} else {
|
||||
#[path = "../unsupported/locks/mod.rs"]
|
||||
pub mod locks;
|
||||
#[path = "../unsupported/once.rs"]
|
||||
pub mod once;
|
||||
#[path = "../unsupported/thread.rs"]
|
||||
|
@ -33,8 +33,6 @@ pub mod thread_local_key;
|
||||
#[path = "../unsupported/time.rs"]
|
||||
pub mod time;
|
||||
|
||||
#[path = "../unsupported/locks/mod.rs"]
|
||||
pub mod locks;
|
||||
#[path = "../unsupported/thread.rs"]
|
||||
pub mod thread;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user