// We do not support forking, so there is nothing to do here.
this.write_null(dest)?;
}
+ "sched_yield" => {
+ this.write_null(dest)?;
+ }
// Incomplete shims that we "stub out" just to get pre-main initialization code to work.
// These shims are enabled only when the caller is in the standard library.
// FIXME: we should set last_error, but to what?
this.write_null(dest)?;
}
+ "SwitchToThread" => {
+ // Note that once Miri supports concurrency, this will need to return a nonzero
+ // value if this call does result in switching to another thread.
+ this.write_null(dest)?;
+ }
// Better error for attempts to create a thread
"CreateThread" => {
test_rwlock_stdlib();
}
test_spin_loop_hint();
+ test_thread_yield_now();
}
fn test_mutex_stdlib() {
fn test_spin_loop_hint() {
atomic::spin_loop_hint();
}
+
+fn test_thread_yield_now() {
+ std::thread::yield_now();
+}