Skip to content

Commit 6ee4510

Browse files
committed
std: move locks to sys on Windows
1 parent 491d1a7 commit 6ee4510

File tree

8 files changed

+10
-8
lines changed

8 files changed

+10
-8
lines changed

Diff for: library/std/src/sys/locks/condvar/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ cfg_if::cfg_if! {
1414
} else if #[cfg(target_family = "unix")] {
1515
mod pthread;
1616
pub use pthread::Condvar;
17+
} else if #[cfg(target_os = "windows")] {
18+
mod windows;
19+
pub use windows::Condvar;
1720
} else if #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] {
1821
mod sgx;
1922
pub use sgx::Condvar;

Diff for: library/std/src/sys/pal/windows/locks/condvar.rs renamed to library/std/src/sys/locks/condvar/windows.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl Condvar {
2727
let r = c::SleepConditionVariableSRW(
2828
self.inner.get(),
2929
mutex::raw(mutex),
30-
crate::sys::pal::windows::dur2timeout(dur),
30+
crate::sys::pal::dur2timeout(dur),
3131
0,
3232
);
3333
if r == 0 {

Diff for: library/std/src/sys/locks/mutex/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ cfg_if::cfg_if! {
1919
))] {
2020
mod pthread;
2121
pub use pthread::{Mutex, raw};
22+
} else if #[cfg(target_os = "windows")] {
23+
mod windows;
24+
pub use windows::{Mutex, raw};
2225
} else if #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] {
2326
mod sgx;
2427
pub use sgx::Mutex;

Diff for: library/std/src/sys/locks/rwlock/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ cfg_if::cfg_if! {
1414
} else if #[cfg(target_family = "unix")] {
1515
mod queue;
1616
pub use queue::RwLock;
17+
} else if #[cfg(target_os = "windows")] {
18+
mod windows;
19+
pub use windows::RwLock;
1720
} else if #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] {
1821
mod sgx;
1922
pub use sgx::RwLock;

Diff for: library/std/src/sys/pal/windows/locks/mod.rs

-6
This file was deleted.

Diff for: library/std/src/sys/pal/windows/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ pub mod env;
1919
pub mod fs;
2020
pub mod handle;
2121
pub mod io;
22-
pub mod locks;
2322
pub mod memchr;
2423
pub mod net;
2524
pub mod os;

0 commit comments

Comments
 (0)