We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99b0659 commit 50e4fedCopy full SHA for 50e4fed
library/std/src/sys/pal/xous/thread.rs
@@ -68,14 +68,18 @@ impl Thread {
68
)
69
.map_err(|code| io::Error::from_raw_os_error(code as i32))?;
70
71
- extern "C" fn thread_start(main: *mut usize, guard_page_pre: usize, stack_size: usize) {
+ extern "C" fn thread_start(
72
+ main: *mut usize,
73
+ guard_page_pre: usize,
74
+ stack_size: usize,
75
+ ) -> ! {
76
unsafe {
- // Finally, let's run some code.
77
+ // Run the contents of the new thread.
78
Box::from_raw(main as *mut Box<dyn FnOnce()>)();
79
}
80
81
// Destroy TLS, which will free the TLS page and call the destructor for
- // any thread local storage.
82
+ // any thread local storage (if any).
83
84
crate::sys::thread_local_key::destroy_tls();
85
0 commit comments