Add WaitOnAddress/WakeByAddress API to sys::windows::c.
This commit is contained in:
parent
738d4a7a36
commit
92f7ba8446
2 changed files with 16 additions and 0 deletions
|
@ -1096,3 +1096,18 @@ compat_fn! {
|
||||||
panic!("rwlocks not available")
|
panic!("rwlocks not available")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
compat_fn! {
|
||||||
|
"api-ms-win-core-synch-l1-2-0":
|
||||||
|
pub fn WaitOnAddress(
|
||||||
|
Address: LPVOID,
|
||||||
|
CompareAddress: LPVOID,
|
||||||
|
AddressSize: SIZE_T,
|
||||||
|
dwMilliseconds: DWORD
|
||||||
|
) -> BOOL {
|
||||||
|
panic!("WaitOnAddress not available")
|
||||||
|
}
|
||||||
|
pub fn WakeByAddressSingle(Address: LPVOID) -> () {
|
||||||
|
// If this api is unavailable, there cannot be anything waiting, because
|
||||||
|
// WaitOnAddress would've panicked. So it's fine to do nothing here.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ macro_rules! compat_fn {
|
||||||
)*) => ($(
|
)*) => ($(
|
||||||
$(#[$meta])*
|
$(#[$meta])*
|
||||||
pub mod $symbol {
|
pub mod $symbol {
|
||||||
|
#[allow(unused_imports)]
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::sync::atomic::{AtomicUsize, Ordering};
|
use crate::sync::atomic::{AtomicUsize, Ordering};
|
||||||
use crate::mem;
|
use crate::mem;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue