Skip to content

Commit bc7513b

Browse files
committed
move CreateThread to windows shims
1 parent 1dbc0c9 commit bc7513b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/shims/foreign_items/posix.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
240240
this.write_null(dest)?;
241241
}
242242

243-
// We don't support threading. (Also for Windows.)
244-
| "pthread_create"
245-
| "CreateThread"
246-
=> {
243+
// We don't support threading.
244+
"pthread_create" => {
247245
throw_unsup_format!("Miri does not support threading");
248246
}
249247

src/shims/foreign_items/windows.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
196196
this.gen_random(ptr, len as usize)?;
197197
this.write_scalar(Scalar::from_bool(true), dest)?;
198198
}
199+
// We don't support threading.
200+
"CreateThread" => {
201+
throw_unsup_format!("Miri does not support threading");
202+
}
199203
_ => throw_unsup_format!("can't call foreign function: {}", link_name),
200204
}
201205

0 commit comments

Comments
 (0)