Fixed compatibility of output.
[AROS.git] / compiler / posixc / siglongjmp.c
bloba26944132c0a2a6f84b9d3453b06f15c378d74b4
1 /*
2 Copyright © 2015, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: POSIX.1-2008 function siglongjmp()
6 Lang: english
7 */
9 /******************************************************************************
11 NAME
12 #include <setjmp.h>
14 void siglongjmp (
16 /* SYNOPSIS
17 jmp_buf env,
18 int val)
20 FUNCTION
21 Save the current context so that you can return to it later.
23 INPUTS
24 env - The context/environment to restore
25 val - This value is returned by setjmp() when you return to the
26 saved context. You cannot return 0. If val is 0, then
27 setjmp() returns with 1.
29 RESULT
30 This function doesn't return.
32 NOTES
34 EXAMPLE
35 jmp_buf env;
37 ... some code ...
39 if (!setjmp (env))
41 ... this code is executed after setjmp() returns ...
43 // This is no good example on how to use this function
44 // You should not do that
45 if (error)
46 siglongjmp (env, 5);
48 ... some code ...
50 else
52 ... this code is executed if you call siglongjmp(env) ...
55 BUGS
57 SEE ALSO
58 stdc/setjmp()
60 INTERNALS
62 ******************************************************************************/
64 #error siglongjmp has to be implemented for each cpu