mirror of https://github.com/rust-lang/rust.git
sys/windows: remove miri hack that is only needed for win7
This commit is contained in:
parent
ecf2d1fa4b
commit
2ae3b1b09a
|
@ -175,9 +175,9 @@ extern "system" {
|
|||
pub fn WakeByAddressAll(address: *const c_void);
|
||||
}
|
||||
|
||||
// These are loaded by `load_synch_functions`.
|
||||
#[cfg(target_vendor = "win7")]
|
||||
compat_fn_optional! {
|
||||
crate::sys::compat::load_synch_functions();
|
||||
pub fn WaitOnAddress(
|
||||
address: *const c_void,
|
||||
compareaddress: *const c_void,
|
||||
|
|
|
@ -198,11 +198,10 @@ macro_rules! compat_fn_with_fallback {
|
|||
|
||||
/// Optionally loaded functions.
|
||||
///
|
||||
/// Actual loading of the function defers to $load_functions.
|
||||
/// Relies on the functions being pre-loaded elsewhere.
|
||||
#[cfg(target_vendor = "win7")]
|
||||
macro_rules! compat_fn_optional {
|
||||
($load_functions:expr;
|
||||
$(
|
||||
($(
|
||||
$(#[$meta:meta])*
|
||||
$vis:vis fn $symbol:ident($($argname:ident: $argtype:ty),*) $(-> $rettype:ty)?;
|
||||
)+) => (
|
||||
|
@ -221,9 +220,6 @@ macro_rules! compat_fn_optional {
|
|||
|
||||
#[inline(always)]
|
||||
pub fn option() -> Option<F> {
|
||||
// Miri does not understand the way we do preloading
|
||||
// therefore load the function here instead.
|
||||
#[cfg(miri)] $load_functions;
|
||||
NonNull::new(PTR.load(Ordering::Relaxed)).map(|f| unsafe { mem::transmute(f) })
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue