Skip to content

Commit 175987c

Browse files
committed
---
yaml --- r: 191790 b: refs/heads/snap-stage3 c: ea8b82e h: refs/heads/master v: v3
1 parent 205a708 commit 175987c

File tree

5 files changed

+198
-222
lines changed

5 files changed

+198
-222
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 809a554fca2d0ebc2ba50077016fe282a4064752
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: e256b7f049b44fa697b9f9c5e75b4433a7d9ffdf
4+
refs/heads/snap-stage3: ea8b82e90c450febb1f26a07862a1ec89c22addd
55
refs/heads/try: ce76bff75603a754d092456285ff455eb871633d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/libstd/sys/common/thread.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,23 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use core::prelude::*;
11+
use prelude::v1::*;
1212

13-
use boxed::Box;
14-
use mem;
1513
use usize;
1614
use libc;
1715
use thunk::Thunk;
1816
use sys_common::stack;
19-
use sys::{thread, stack_overflow};
17+
use sys::stack_overflow;
2018

2119
// This is the starting point of rust os threads. The first thing we do
2220
// is make sure that we don't trigger __morestack (also why this has a
2321
// no_stack_check annotation), and then we extract the main function
2422
// and invoke it.
2523
#[no_stack_check]
26-
pub fn start_thread(main: *mut libc::c_void) -> thread::rust_thread_return {
24+
pub fn start_thread(main: *mut libc::c_void) {
2725
unsafe {
2826
stack::record_os_managed_stack_bounds(0, usize::MAX);
29-
let handler = stack_overflow::Handler::new();
30-
let f: Box<Thunk> = Box::from_raw(main as *mut Thunk);
31-
f.invoke(());
32-
drop(handler);
33-
mem::transmute(0 as thread::rust_thread_return)
27+
let _handler = stack_overflow::Handler::new();
28+
Box::from_raw(main as *mut Thunk).invoke(());
3429
}
3530
}

0 commit comments

Comments
 (0)