longjmp

Restores a saved environment

Local Servers:nonblocking
Remote Servers:N/A
Classification:ANSI
Service:Thread

Syntax

  #include <setjmp.h>  
   
  void longjmp  (  
     jmp_buf   env,   
     int       value); 
  

Parameters

env
(IN) Specifies the environment to be restored.
value
(IN) Specifies the value to return.

Return Values

This function returns no value.

Remarks

The longjmp function restores the environment saved by the most recent call to setjmp with the corresponding jmp_buf argument. After longjmp restores the environment, program execution continues as if the corresponding call to setjmp has just returned the value specified by value.

The setjmp function must be called before longjmp. The routine that called setjmp and set up env must still be active and cannot have returned before longjmp is called. If this happens, the results are unpredictable. If value is 0, the value returned is 1.

See Also

setjmp