@@ -44,53 +44,16 @@ index f6dee7c..0c6a8c0 100644
4444 #[unstable(feature = "coerce_unsized", issue = "27732")]
4545 impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Box<U>> for Box<T> {}
4646
47- diff --git a/src/libstd/sys_common/at_exit_imp.rs b/src/libstd/sys_common/at_exit_imp.rs 
48- index 1181b86..20f9251 100644
49- --- a/src/libstd/sys_common/at_exit_imp.rs 
50- +++ b/src/libstd/sys_common/at_exit_imp.rs 
51- @@ -38,6 +38,7 @@  unsafe fn init() -> bool {
52-      true
53-  }
54-  
55- + /*
56-  pub fn cleanup() {
57-      for i in 1..=ITERS {
58-          unsafe {
59- @@ -60,6 +61,7 @@  pub fn cleanup() {
60-          }
61-      }
62-  }
63- + */
64-  
65-  pub fn push(f: Box<dyn FnOnce()>) -> bool {
66-      unsafe {
67- diff --git a/src/libstd/sys_common/mod.rs b/src/libstd/sys_common/mod.rs 
68- index 6260c3b..611ed7e 100644
69- --- a/src/libstd/sys_common/mod.rs 
70- +++ b/src/libstd/sys_common/mod.rs 
71- @@ -127,7 +127,6 @@  pub fn cleanup() {
72-      CLEANUP.call_once(|| unsafe {
73-          sys::args::cleanup();
74-          sys::stack_overflow::cleanup();
75- -         at_exit_imp::cleanup();
76-      });
77-  }
78-  
7947diff --git a/src/libstd/sys_common/thread.rs b/src/libstd/sys_common/thread.rs 
8048index b2142e7..718bb1c 100644
8149--- a/src/libstd/sys_common/thread.rs 
8250+++ b/src/libstd/sys_common/thread.rs 
83- @@ -6,12 +6,7 @@  use crate::sys::thread as imp;
51+ @@ -6,7 +6,7 @@  pub unsafe fn start_thread(main: *mut u8) {
52+      let _handler = stack_overflow::Handler::new();
8453
85-  #[allow(dead_code)]
86-  pub unsafe fn start_thread(main: *mut u8) {
87- -     // Next, set up our stack overflow handler which may get triggered if we run
88- -     // out of stack.
89- -     let _handler = stack_overflow::Handler::new();
90- - 
91- -     // Finally, let's run some code.
54+      // Finally, let's run some code.
9255-     Box::from_raw(main as *mut Box<dyn FnOnce()>)()
93- +     panic!("Threads are not yet supported, because cranelift doesn't support atomics."); 
56+ +     Box::from_raw(main as *mut Box<dyn FnBox()>)() 
9457 }
9558
9659 pub fn min_stack() -> usize {
@@ -102,7 +65,7 @@ index f4a1783..362b537 100644
10265     // unsafe: see thread::Builder::spawn_unchecked for safety requirements
10366     pub unsafe fn new(stack: usize, p: Box<dyn FnOnce()>)
10467                           -> io::Result<Thread> {
105- +         panic!("Threads are not yet supported, because cranelift doesn't support atomics.");
68+ +         panic!("Warning:  Threads are not yet fully  supported, because cranelift doesn't support atomics.");
10669+ 
10770         let p = box p;
10871         let mut native: libc::pthread_t = mem::zeroed();
0 commit comments