diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-01-12 22:17:21 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-01-12 22:24:27 -0800 |
| commit | 0616cba62be78082f10f6673d45ba4d94da423dc (patch) | |
| tree | 0cd1d0cf9434a751b293b8292da1c153065da491 /src/rt/rust_builtin.cpp | |
| parent | dcac427795285a46232722a38e8a5f88ae4dc891 (diff) | |
| download | rust-0616cba62be78082f10f6673d45ba4d94da423dc.tar.gz rust-0616cba62be78082f10f6673d45ba4d94da423dc.zip | |
libcore: Add sys::set_exit_status
Sets the process exit code
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 264e6fdb325..7bd1c76c187 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -561,6 +561,12 @@ port_recv(uintptr_t *dptr, rust_port *port, return; } +extern "C" CDECL void +rust_set_exit_status(intptr_t code) { + rust_task *task = rust_scheduler::get_task(); + task->kernel->set_exit_status((int)code); +} + // // Local Variables: // mode: C++ |
