std/sys/thread/
unsupported.rs1use crate::ffi::CStr;
2use crate::io;
3use crate::num::NonZero;
4use crate::thread::ThreadInit;
5use crate::time::Duration;
6
7#[expect(dead_code)]
9fn dummy_init_call(init: Box<ThreadInit>) {
10 drop(init.init());
11}
12
13pub struct Thread(!);
14
15pub const DEFAULT_MIN_STACK_SIZE: usize = 64 * 1024;
16
17impl Thread {
18 pub unsafe fn new(_stack: usize, _init: Box<ThreadInit>) -> io::Result<Thread> {
20 Err(io::Error::UNSUPPORTED_PLATFORM)
21 }
22
23 pub fn join(self) {
24 self.0
25 }
26}
27
28pub fn available_parallelism() -> io::Result<NonZero<usize>> {
29 Err(io::Error::UNKNOWN_THREAD_COUNT)
30}
31
32pub fn current_os_id() -> Option<u64> {
33 None
34}
35
36pub fn yield_now() {
37 }
39
40pub fn set_name(_name: &CStr) {
41 }
43
44pub fn sleep(_dur: Duration) {
45 panic!("can't sleep");
46}