diff options
| author | bors <bors@rust-lang.org> | 2014-01-15 17:46:42 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-01-15 17:46:42 -0800 |
| commit | a5ed0c58cb9f38af940403c34e283b68c89f5aa2 (patch) | |
| tree | a8be28b83687b5a2fabc870c65a3a49b66b4bd95 /src/libnative | |
| parent | 36971217aa64b6fc5f543f2620e488d16e67b1f4 (diff) | |
| parent | 29840addd46b6ae01b61ee93247164d5818f09e0 (diff) | |
| download | rust-a5ed0c58cb9f38af940403c34e283b68c89f5aa2.tar.gz rust-a5ed0c58cb9f38af940403c34e283b68c89f5aa2.zip | |
auto merge of #11565 : mozilla/rust/snapshot, r=huonw
Diffstat (limited to 'src/libnative')
| -rw-r--r-- | src/libnative/lib.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/libnative/lib.rs b/src/libnative/lib.rs index 91c5e505178..584314ca04a 100644 --- a/src/libnative/lib.rs +++ b/src/libnative/lib.rs @@ -39,30 +39,6 @@ static OS_DEFAULT_STACK_ESTIMATE: uint = 1 << 20; #[cfg(unix, not(android))] static OS_DEFAULT_STACK_ESTIMATE: uint = 2 * (1 << 20); - -// XXX: this should not exist here -#[cfg(stage0, nativestart)] -#[lang = "start"] -pub fn lang_start(main: *u8, argc: int, argv: **u8) -> int { - use std::cast; - use std::task; - - do start(argc, argv) { - // Instead of invoking main directly on this thread, invoke it on - // another spawned thread that we are guaranteed to know the size of the - // stack of. Currently, we do not have a method of figuring out the size - // of the main thread's stack, so for stack overflow detection to work - // we must spawn the task in a subtask which we know the stack size of. - let main: extern "Rust" fn() = unsafe { cast::transmute(main) }; - let mut task = task::task(); - task.name("<main>"); - match do task.try { main() } { - Ok(()) => { os::set_exit_status(0); } - Err(..) => { os::set_exit_status(rt::DEFAULT_ERROR_CODE); } - } - } -} - /// Executes the given procedure after initializing the runtime with the given /// argc/argv. /// |
