Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sigsetjmp(3) — posix — mips UMIPS RISC/os 4.52

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

setjmp(3C)

sigaction(2)

sigprocmask(2)

sigsuspend(2)



SIGSETJMP(3-POSIX)  RISC/os Reference Manual   SIGSETJMP(3-POSIX)



NAME
     sigsetjmp, siglongjmp - non-local jumps

SYNOPSIS
     #include <setjmp.h>

     int sigsetjmp(env, savemask)
     sigjmpbuf env;
     int savemask;

     void siglongjmp(env, val)
     sigjmpbuf env;
     int val;

DESCRIPTION
     These functions are useful for dealing with errors and
     interrupts encountered in a low-level subroutine of a pro-
     gram.

     sigsetjmp saves its stack environment in env (whose type,
     sigjmp_buf, is defined in the <setjmp.h> header file) for
     later use by siglongjmp.  If savemask is not zero, sigsetjmp
     also saves the process' current signal mask as part of the
     calling environment.  sigsetjmp returns the value 0.

     siglongjmp restores the environment saved by the last call
     of sigsetjmp with the corresponding env argument.  If env
     was initialized by a call to sigsetjmp with a non-zero
     savemask, siglongjmp also restores the saved signal mask.

     After siglongjmp is completed, program execution continues
     as if the corresponding call of sigsetjmp (which must not
     itself have returned in the interim) had just returned the
     value val.  siglongjmp cannot cause sigsetjmp to return the
     value 0.  If siglongjmp is invoked with a second argument of
     0, sigsetjmp will return 1.  At the time of the second
     return from sigsetjmp, all accessible data have values as of
     the time siglongjmp is called.  However, global variables
     will have the expected values, i.e. those as of the time of
     the siglongjmp.

SEE ALSO
     setjmp(3C), sigaction(2), sigprocmask(2), sigsuspend(2).












                         Printed 1/15/91                   Page 1



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026