File:  [MW Coherent from dump] / coherent / a / usr / man / ALL / longjmp
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:34 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent



longjmp()                General Function               longjmp()




Return from a non-local goto

#include <setjmp.h>
iinntt lloonnggjjmmpp(_e_n_v, _r_v_a_l) jjmmpp_bbuuff _e_n_v; iinntt _r_v_a_l;

The function call is the only mechanism that C provides to trans-
fer control between  functions.  This mechanism is inadequate for
some purposes,  such as handling unexpected  errors or interrupts
at  lower levels  of  a program.   To answer  this need,  lloonnggjjmmpp
provides a non-local _g_o_t_o.

lloonnggjjmmpp restores an environment that had been saved by a previous
call to  the function sseettjjmmpp.   It returns the value  _r_v_a_l to the
caller of  sseettjjmmpp, just as if the sseettjjmmpp  call had just returned.
Note that  lloonnggjjmmpp must not restore the  environment of a routine
that has  already returned.  The type  declaration for jjmmpp_bbuuff is
in the header  file sseettjjmmpp.hh.  The environment saved includes the
program counter, stack  pointer, and stack frame.  These routines
do not restore register variables in the environment returned.

***** Example *****

For an example of this function, see the entry for longjmp.

***** See Also *****

general functions, setjmp()

***** Notes *****

Programmers should  note that many user-level  routines cannot be
interrupted and reentered  safely.  For that reason, improper use
of longjmp  and setjmp can  result in the  creation of mysterious
and irreproducible bugs.  Do not attempt to use longjmp within an
exception handler.





















COHERENT Lexicon                                           Page 1



unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.