Skip to content

Commit

Permalink
Miri: Add CreateWaitableTimerEx stub
Browse files Browse the repository at this point in the history
This function will always fail, allowing std's `Sleep` fallback path to be taken instead.
  • Loading branch information
ChrisDenton committed Oct 6, 2023
1 parent 9ac43c5 commit b9255cb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/tools/miri/src/shims/windows/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,14 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {

this.Sleep(timeout)?;
}
"CreateWaitableTimerExW" => {
let [_attributes, _name, _flags, _access] =
this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
// Unimplemented. Always return failure.
let not_supported = this.eval_windows("c", "ERROR_NOT_SUPPORTED");
this.set_last_error(not_supported)?;
this.write_null(dest)?;
}

// Synchronization primitives
"AcquireSRWLockExclusive" => {
Expand Down

0 comments on commit b9255cb

Please sign in to comment.