Move exit guard from sys::common::exit_guard to sys::exit_guard. · model-checking/verify-rust-std@ca0f659 (original) (raw)
5 files changed
lines changed
Original file line number |
Diff line number |
Diff line change |
@@ -146,8 +146,7 @@ fn lang_start_internal( |
|
|
146 |
146 |
panic::catch_unwind(cleanup).map_err(rt_abort)?; |
147 |
147 |
// Guard against multple threads calling `libc::exit` concurrently. |
148 |
148 |
// See the documentation for `unique_thread_exit` for more information. |
149 |
|
- panic::catch_unwind(| |
150 |
|
-.map_err(rt_abort)?; |
|
149 |
+ panic::catch_unwind(| |
151 |
150 |
ret_code |
152 |
151 |
} |
153 |
152 |
|
File renamed without changes.
Original file line number |
Diff line number |
Diff line change |
@@ -3,6 +3,7 @@ |
|
|
3 |
3 |
/// descriptors. |
4 |
4 |
mod pal; |
5 |
5 |
|
|
6 |
+pub(crate) mod exit_guard; |
6 |
7 |
mod personality; |
7 |
8 |
|
8 |
9 |
pub mod backtrace; |
Original file line number |
Diff line number |
Diff line change |
@@ -11,7 +11,6 @@ |
|
|
11 |
11 |
#![allow(dead_code)] |
12 |
12 |
|
13 |
13 |
pub mod alloc; |
14 |
|
-pub mod exit_guard; |
15 |
14 |
pub mod small_c_string; |
16 |
15 |
|
17 |
16 |
#[cfg(test)] |
Original file line number |
Diff line number |
Diff line change |
@@ -758,7 +758,7 @@ pub fn home_dir() -> Option { |
|
|
758 |
758 |
} |
759 |
759 |
|
760 |
760 |
pub fn exit(code: i32) -> ! { |
761 |
|
-crate::sys::common::exit_guard::unique_thread_exit(); |
|
761 |
+crate::sys::exit_guard::unique_thread_exit(); |
762 |
762 |
unsafe { libc::exit(code as c_int) } |
763 |
763 |
} |
764 |
764 |
|