Skip to content

Rename exit_immediately to immediate_exit. #153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
run: |
set -ex
sudo apt-get update
sudo apt-get install -y ${{ matrix.gcc_package }} ninja-build
sudo apt-get install -y ${{ matrix.gcc_package }} ninja-build libglib2.0-dev
upcase=$(echo ${{ matrix.host_target }} | awk '{ print toupper($0) }' | sed 's/-/_/g')
echo CARGO_TARGET_${upcase}_LINKER=${{ matrix.gcc }} >> $GITHUB_ENV
echo CC_${{ matrix.target }}=${{ matrix.gcc }} >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion example-crates/tiny-hello/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ unsafe fn origin_main(_argc: usize, _argv: *mut *mut u8, _envp: *mut *mut u8) ->
Err(_) => origin::program::trap(),
}
}
origin::program::exit_immediately(0);
origin::program::immediate_exit(0);
}
2 changes: 1 addition & 1 deletion src/program/libc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub fn exit(status: c_int) -> ! {
/// Exit the program without calling functions registered with [`at_exit`] or
/// with the `.fini_array` section.
#[inline]
pub fn exit_immediately(status: c_int) -> ! {
pub fn immediate_exit(status: c_int) -> ! {
unsafe {
// Call `libc` to exit the program.
libc::_exit(status)
Expand Down
6 changes: 3 additions & 3 deletions src/program/linux_raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,14 +325,14 @@ pub fn exit(status: c_int) -> ! {
}
}

// Call `exit_immediately` to exit the program.
exit_immediately(status)
// Call `immediate_exit` to exit the program.
immediate_exit(status)
}

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

Expand Down