Skip to content

Commit 2b04e39

Browse files
committed
Remove incorrect try_lock from Windows critical section shim
1 parent 3358592 commit 2b04e39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/shims/foreign_items/windows.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,12 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
124124
| "DeleteCriticalSection"
125125
=> {
126126
// Nothing to do, not even a return value.
127+
// (Windows locks are reentrant, and we have only 1 thread,
128+
// so not doing any futher checks here is at least not incorrect.)
127129
}
128130

129131
| "GetModuleHandleW"
130132
| "GetProcAddress"
131-
| "TryEnterCriticalSection"
132133
| "GetConsoleScreenBufferInfo"
133134
| "SetConsoleTextAttribute"
134135
=> {

0 commit comments

Comments
 (0)