// And move to the final state.
self.0 = Done;
}
- "wasi" | "none" => {
- // No OS, no TLS dtors.
+ _ => {
+ // No TLS dtor support.
// FIXME: should we do something on wasi?
self.0 = Done;
}
- os => {
- throw_unsup_format!(
- "the TLS machinery does not know how to handle OS `{os}`"
- );
- }
}
}
PthreadDtors(state) => {
return Ok(());
}
let thread_callback =
- this.eval_windows("thread_local_key", "p_thread_callback")?.to_pointer(this)?;
+ this.eval_windows("thread_local_key", "p_thread_callback").to_pointer(this)?;
let thread_callback = this.get_ptr_fn(thread_callback)?.as_instance()?;
// FIXME: Technically, the reason should be `DLL_PROCESS_DETACH` when the main thread exits
// but std treats both the same.
- let reason = this.eval_windows("c", "DLL_THREAD_DETACH")?;
+ let reason = this.eval_windows("c", "DLL_THREAD_DETACH");
// The signature of this function is `unsafe extern "system" fn(h: c::LPVOID, dwReason: c::DWORD, pv: c::LPVOID)`.
// FIXME: `h` should be a handle to the current module and what `pv` should be is unknown