2 * Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 * Distributed under the terms of the Haiku License.
10 /** This function is called by sigsetjmp() only */
12 int __setjmp_save_sigs(jmp_buf buffer
, int saveMask
);
15 __setjmp_save_sigs(jmp_buf buffer
, int saveMask
)
17 // If the signal mask shall be saved, we save the inverted signal mask. The
18 // reason for this is that due to unblockable signals the inverted signal
19 // mask is never zero and thus we can use a zero value to indicate that the
20 // mask has not been saved.
22 if (saveMask
!= 0 && sigprocmask(SIG_BLOCK
, NULL
, &signalMask
) == 0)
23 buffer
[0].inverted_signal_mask
= ~signalMask
;
25 buffer
[0].inverted_signal_mask
= 0;