diff options
| author | Chris Denton <christophersdenton@gmail.com> | 2022-08-04 01:46:14 +0100 |
|---|---|---|
| committer | Chris Denton <christophersdenton@gmail.com> | 2022-08-04 01:46:14 +0100 |
| commit | c985648593122a6fc8ec146a9ca755b73d0dc788 (patch) | |
| tree | a53a5f51c9e9a2584206706f0bc6edd228fab07c /library/std/src/sys/windows/c.rs | |
| parent | aac82a9e187d314b770baa4bf1bda7ce3d113d01 (diff) | |
| download | rust-c985648593122a6fc8ec146a9ca755b73d0dc788.tar.gz rust-c985648593122a6fc8ec146a9ca755b73d0dc788.zip | |
Remove Windows function preloading
Diffstat (limited to 'library/std/src/sys/windows/c.rs')
| -rw-r--r-- | library/std/src/sys/windows/c.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/library/std/src/sys/windows/c.rs b/library/std/src/sys/windows/c.rs index 478068c73ba..c340baf2a4a 100644 --- a/library/std/src/sys/windows/c.rs +++ b/library/std/src/sys/windows/c.rs @@ -1250,19 +1250,15 @@ compat_fn_with_fallback! { } } -compat_fn_optional! { +compat_fn_with_fallback! { pub static SYNCH_API: &CStr = ansi_str!("api-ms-win-core-synch-l1-2-0"); - - // >= Windows 8 / Server 2012 - // https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitonaddress - pub fn WaitOnAddress( - Address: LPVOID, - CompareAddress: LPVOID, - AddressSize: SIZE_T, - dwMilliseconds: DWORD - ) -> BOOL; - pub fn WakeByAddressSingle(Address: LPVOID) -> (); + #[allow(unused)] + fn WakeByAddressSingle(Address: LPVOID) -> () { + crate::sys::windows::thread_parker::unpark_keyed_event(Address) + } } +pub use crate::sys::compat::WaitOnAddress; +pub use WakeByAddressSingle::call as wake_by_address_single_or_unpark_keyed_event; compat_fn_with_fallback! { pub static NTDLL: &CStr = ansi_str!("ntdll"); |
