File tree Expand file tree Collapse file tree 5 files changed +198
-222
lines changed Expand file tree Collapse file tree 5 files changed +198
-222
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
31
31
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
32
32
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
33
33
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34
- refs/heads/beta: e256b7f049b44fa697b9f9c5e75b4433a7d9ffdf
34
+ refs/heads/beta: ea8b82e90c450febb1f26a07862a1ec89c22addd
35
35
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
36
36
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37
37
refs/heads/tmp: de8a23bbc3a7b9cbd7574b5b91a34af59bf030e6
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- use core :: prelude :: * ;
11
+ use prelude :: v1 :: * ;
12
12
13
- use boxed:: Box ;
14
- use mem;
15
13
use usize;
16
14
use libc;
17
15
use thunk:: Thunk ;
18
16
use sys_common:: stack;
19
- use sys:: { thread , stack_overflow} ;
17
+ use sys:: stack_overflow;
20
18
21
19
// This is the starting point of rust os threads. The first thing we do
22
20
// is make sure that we don't trigger __morestack (also why this has a
23
21
// no_stack_check annotation), and then we extract the main function
24
22
// and invoke it.
25
23
#[ 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 ) {
27
25
unsafe {
28
26
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 ( ( ) ) ;
34
29
}
35
30
}
You can’t perform that action at this time.
0 commit comments