about summary refs log tree commit diff
path: root/src/libnative
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2014-01-15 07:18:40 -0500
committerDaniel Micay <danielmicay@gmail.com>2014-01-15 08:22:56 -0500
commit197fe67e11af002033bb2dc7b5a48ef433a7b103 (patch)
tree833ef111494ac6a79338642aa69c251a3cb02e87 /src/libnative
parent29070c3bee8846d22030305179fdd3f95cb320d7 (diff)
downloadrust-197fe67e11af002033bb2dc7b5a48ef433a7b103.tar.gz
rust-197fe67e11af002033bb2dc7b5a48ef433a7b103.zip
register snapshots
Diffstat (limited to 'src/libnative')
-rw-r--r--src/libnative/lib.rs24
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.
 ///