Skip to content

Commit 7f45b4a

Browse files
authored
Rename exit_immediately to immediate_exit. (#153)
* 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 * Install libglib2.0-dev in CI to fix the qemu build.
1 parent f79fed5 commit 7f45b4a

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Diff for: .github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
run: |
7676
set -ex
7777
sudo apt-get update
78-
sudo apt-get install -y ${{ matrix.gcc_package }} ninja-build
78+
sudo apt-get install -y ${{ matrix.gcc_package }} ninja-build libglib2.0-dev
7979
upcase=$(echo ${{ matrix.host_target }} | awk '{ print toupper($0) }' | sed 's/-/_/g')
8080
echo CARGO_TARGET_${upcase}_LINKER=${{ matrix.gcc }} >> $GITHUB_ENV
8181
echo CC_${{ matrix.target }}=${{ matrix.gcc }} >> $GITHUB_ENV

Diff for: 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
}

Diff for: 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)

Diff for: 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)