mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
std: move locks to sys
on Windows
This commit is contained in:
parent
491d1a7664
commit
6ee45102fe
@ -14,6 +14,9 @@ cfg_if::cfg_if! {
|
||||
} else if #[cfg(target_family = "unix")] {
|
||||
mod pthread;
|
||||
pub use pthread::Condvar;
|
||||
} else if #[cfg(target_os = "windows")] {
|
||||
mod windows;
|
||||
pub use windows::Condvar;
|
||||
} else if #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] {
|
||||
mod sgx;
|
||||
pub use sgx::Condvar;
|
||||
|
@ -27,7 +27,7 @@ impl Condvar {
|
||||
let r = c::SleepConditionVariableSRW(
|
||||
self.inner.get(),
|
||||
mutex::raw(mutex),
|
||||
crate::sys::pal::windows::dur2timeout(dur),
|
||||
crate::sys::pal::dur2timeout(dur),
|
||||
0,
|
||||
);
|
||||
if r == 0 {
|
@ -19,6 +19,9 @@ cfg_if::cfg_if! {
|
||||
))] {
|
||||
mod pthread;
|
||||
pub use pthread::{Mutex, raw};
|
||||
} else if #[cfg(target_os = "windows")] {
|
||||
mod windows;
|
||||
pub use windows::{Mutex, raw};
|
||||
} else if #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] {
|
||||
mod sgx;
|
||||
pub use sgx::Mutex;
|
||||
|
@ -14,6 +14,9 @@ cfg_if::cfg_if! {
|
||||
} else if #[cfg(target_family = "unix")] {
|
||||
mod queue;
|
||||
pub use queue::RwLock;
|
||||
} else if #[cfg(target_os = "windows")] {
|
||||
mod windows;
|
||||
pub use windows::RwLock;
|
||||
} else if #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] {
|
||||
mod sgx;
|
||||
pub use sgx::RwLock;
|
||||
|
@ -1,6 +0,0 @@
|
||||
mod condvar;
|
||||
mod mutex;
|
||||
mod rwlock;
|
||||
pub use condvar::Condvar;
|
||||
pub use mutex::Mutex;
|
||||
pub use rwlock::RwLock;
|
@ -19,7 +19,6 @@ pub mod env;
|
||||
pub mod fs;
|
||||
pub mod handle;
|
||||
pub mod io;
|
||||
pub mod locks;
|
||||
pub mod memchr;
|
||||
pub mod net;
|
||||
pub mod os;
|
||||
|
Loading…
Reference in New Issue
Block a user