diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-07-09 13:29:05 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-07-09 13:29:05 -0700 |
| commit | 07e52eb7fc75466d294a1fd9d614f5e0276ab834 (patch) | |
| tree | 6182b833c7ca092a18e6e7017fd5752bf5bd6c9c /src/rt/rust_builtin.cpp | |
| parent | ec6d4a1733b07d4cc561eda7463ad596a9d52bf0 (diff) | |
| download | rust-07e52eb7fc75466d294a1fd9d614f5e0276ab834.tar.gz rust-07e52eb7fc75466d294a1fd9d614f5e0276ab834.zip | |
std: Make os::set_exit_status work with newsched
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 8dc773a4d39..caa2b53b3db 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -960,6 +960,21 @@ rust_get_global_args_ptr() { return &global_args_ptr; } +static lock_and_signal exit_status_lock; +static uintptr_t exit_status = 0; + +extern "C" CDECL void +rust_set_exit_status_newrt(uintptr_t code) { + scoped_lock with(exit_status_lock); + exit_status = code; +} + +extern "C" CDECL uintptr_t +rust_get_exit_status_newrt() { + scoped_lock with(exit_status_lock); + return exit_status; +} + // // Local Variables: // mode: C++ |
