Skip to content

Commit

Permalink
Mitigate risk of the lack of sufficient register clobbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed Aug 10, 2023
1 parent 4908938 commit 43d1169
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ extern "C" {

/// Covers the usual use case for setjmp: it invokes the callback, and the code
/// of the callback can use longjmp to exit early from the call_with_setjmp.
#[inline(never)] // see https://github.com/pnkfelix/cee-scape/issues/14
pub fn call_with_setjmp<F>(mut callback: F) -> c_int
where
F: for<'a> FnOnce(&'a JmpBufFields) -> c_int,
Expand Down Expand Up @@ -352,6 +353,7 @@ where

/// Covers the usual use case for sigsetjmp: it invokes the callback, and the code
/// of the callback can use siglongjmp to exit early from the call_with_sigsetjmp.
#[inline(never)] // see https://github.com/pnkfelix/cee-scape/issues/14
pub fn call_with_sigsetjmp<F>(savemask: bool, mut callback: F) -> c_int
where
F: for<'a> FnOnce(&'a SigJmpBufFields) -> c_int,
Expand Down

0 comments on commit 43d1169

Please sign in to comment.