Skip to content

Commit 0fbeb96

Browse files
committed
Windows: Use futex implementation for Once
Keep the queue implementation for win7. Inspired by PR #121956
1 parent eb5e244 commit 0fbeb96

File tree

1 file changed

+2
-1
lines changed
  • library/std/src/sys/sync/once

1 file changed

+2
-1
lines changed

Diff for: library/std/src/sys/sync/once/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
cfg_if::cfg_if! {
1111
if #[cfg(any(
12+
all(target_os = "windows", not(target_vendor="win7")),
1213
target_os = "linux",
1314
target_os = "android",
1415
all(target_arch = "wasm32", target_feature = "atomics"),
@@ -21,7 +22,7 @@ cfg_if::cfg_if! {
2122
mod futex;
2223
pub use futex::{Once, OnceState};
2324
} else if #[cfg(any(
24-
windows,
25+
all(target_os = "windows", target_vendor = "win7"),
2526
target_family = "unix",
2627
all(target_vendor = "fortanix", target_env = "sgx"),
2728
target_os = "solid_asp3",

0 commit comments

Comments
 (0)