Skip to content

Commit

Permalink
Delete unnecessary stub stack overflow handler for cloudabi.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vytautas Astrauskas committed Apr 3, 2020
1 parent d637d6e commit d512b22
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
8 changes: 0 additions & 8 deletions src/libstd/sys/cloudabi/stack_overflow.rs
Original file line number Diff line number Diff line change
@@ -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() {}
6 changes: 1 addition & 5 deletions src/libstd/sys/cloudabi/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit d512b22

Please sign in to comment.