Skip to content

Commit 72c11b6

Browse files
committed
remove criticalsection
1 parent e8921a8 commit 72c11b6

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

src/shims/windows/foreign_items.rs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -460,36 +460,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
460460
// Any non zero value works for the stdlib. This is just used for stack overflows anyway.
461461
this.write_scalar(Scalar::from_u32(1), dest)?;
462462
}
463-
| "InitializeCriticalSection"
464-
| "EnterCriticalSection"
465-
| "LeaveCriticalSection"
466-
| "DeleteCriticalSection"
467-
if this.frame_in_std() =>
468-
{
469-
#[allow(non_snake_case)]
470-
let [_lpCriticalSection] =
471-
this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
472-
assert_eq!(
473-
this.get_total_thread_count(),
474-
1,
475-
"concurrency on Windows is not supported"
476-
);
477-
// Nothing to do, not even a return value.
478-
// (Windows locks are reentrant, and we have only 1 thread,
479-
// so not doing any futher checks here is at least not incorrect.)
480-
}
481-
"TryEnterCriticalSection" if this.frame_in_std() => {
482-
#[allow(non_snake_case)]
483-
let [_lpCriticalSection] =
484-
this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
485-
assert_eq!(
486-
this.get_total_thread_count(),
487-
1,
488-
"concurrency on Windows is not supported"
489-
);
490-
// There is only one thread, so this always succeeds and returns TRUE.
491-
this.write_scalar(Scalar::from_i32(1), dest)?;
492-
}
493463
"GetCurrentProcessId" if this.frame_in_std() => {
494464
let [] = this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
495465
let result = this.GetCurrentProcessId()?;

0 commit comments

Comments
 (0)