sigsetjmp or siglongjmp Subroutine

Purpose

Saves or restores stack context and signal mask.

Library

Standard C Library (libc.a)

Syntax

#include <setjmp.h>

int sigsetjmp ( Environment,  SaveMask)
sigjmp_buf Environment;
int SaveMask;

void siglongjmp (Environment,  Value)
sigjmp_buf Environment;
int Value;

Description

The sigsetjmp subroutine saves the current stack context, and if the value of the SaveMask parameter is not 0, the sigsetjmp subroutine also saves the current signal mask of the process as part of the calling environment.

The siglongjmp subroutine restores the saved signal mask only if the Environment parameter was initialized by a call to the sigsetjmp subroutine with a nonzero SaveMask parameter argument.

Parameters

Item Description
Environment Specifies an address for a sigjmp_buf structure.
SaveMask Specifies the flag used to determine if the signal mask is to be saved.
Value Specifies the return value from the siglongjmp subroutine.

Return Values

The sigsetjmp subroutine returns a value of 0. The siglongjmp subroutine returns a nonzero value.