Skip to content

Commit 22dcaea

Browse files
committed
Rename exit_immediately to immediate_exit.
Aligning with the suggestion [here], which in turn is aligning with [`quick_exit`], rename `exit_immediately` to `immediate_exit`. [here]: bytecodealliance/rustix#1133 (comment) [`quick_exit`]: https://en.cppreference.com/w/c/program/quick_exit
1 parent f79fed5 commit 22dcaea

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

example-crates/tiny-hello/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ unsafe fn origin_main(_argc: usize, _argv: *mut *mut u8, _envp: *mut *mut u8) ->
1616
Err(_) => origin::program::trap(),
1717
}
1818
}
19-
origin::program::exit_immediately(0);
19+
origin::program::immediate_exit(0);
2020
}

src/program/libc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub fn exit(status: c_int) -> ! {
7171
/// Exit the program without calling functions registered with [`at_exit`] or
7272
/// with the `.fini_array` section.
7373
#[inline]
74-
pub fn exit_immediately(status: c_int) -> ! {
74+
pub fn immediate_exit(status: c_int) -> ! {
7575
unsafe {
7676
// Call `libc` to exit the program.
7777
libc::_exit(status)

src/program/linux_raw.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,14 @@ pub fn exit(status: c_int) -> ! {
325325
}
326326
}
327327

328-
// Call `exit_immediately` to exit the program.
329-
exit_immediately(status)
328+
// Call `immediate_exit` to exit the program.
329+
immediate_exit(status)
330330
}
331331

332332
/// Exit the program without calling functions registered with [`at_exit`] or
333333
/// with the `.fini_array` section.
334334
#[inline]
335-
pub fn exit_immediately(status: c_int) -> ! {
335+
pub fn immediate_exit(status: c_int) -> ! {
336336
#[cfg(feature = "log")]
337337
log::trace!("Program exiting with status `{:?}`", status);
338338

0 commit comments

Comments
 (0)