1
Fork 0

Delete unnecessary stub stack overflow handler for cloudabi.

This commit is contained in:
Vytautas Astrauskas 2020-04-03 10:13:49 -07:00
parent d637d6e7a8
commit d512b22f8b
2 changed files with 1 additions and 13 deletions

View file

@ -1,13 +1,5 @@
#![cfg_attr(test, allow(dead_code))]
pub struct Handler;
impl Handler {
pub unsafe fn new() -> Handler {
Handler
}
}
pub unsafe fn init() {}
pub unsafe fn cleanup() {}

View file

@ -4,7 +4,6 @@ use crate::io;
use crate::mem;
use crate::ptr;
use crate::sys::cloudabi::abi;
use crate::sys::stack_overflow;
use crate::sys::time::checked_dur2intervals;
use crate::time::Duration;
@ -47,10 +46,7 @@ impl Thread {
extern "C" fn thread_start(main: *mut libc::c_void) -> *mut libc::c_void {
unsafe {
// Next, set up our stack overflow handler which may get triggered if we run
// out of stack.
let _handler = stack_overflow::Handler::new();
// Finally, let's run some code.
// Let's run some code.
Box::from_raw(main as *mut Box<dyn FnOnce()>)();
}
ptr::null_mut()