2 * setjmp.h - save/restore calling environment
4 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
5 * See the copyright notice in the ACK home directory, in the file "Copyright".
7 /* $Id: setjmp.h,v 1.8 1994/06/24 11:41:07 ceriel Exp $ */
9 #if !defined(_SETJMP_H)
12 /* In a jmp_buf, there is room for: 1 mask (long), 1 flag (int) and 3
13 * pointers (stack-pointer, local base and program-counter). This may be
14 * too big, but that doesn't matter. It could also be too small, when
15 * sigset_t is larger than a long. The fields is in the structure have no
16 * meaning, they just get the size right.
17 * The identifier __setjmp has a special meaning to the compiler.
28 int __setjmp(jmp_buf _env, int _savemask);
30 #define setjmp(env) __setjmp(env, 0)
31 void longjmp(jmp_buf _env, int _val);
33 #if defined(_POSIX_SOURCE)
34 typedef jmp_buf sigjmp_buf;
35 #define sigsetjmp(env, savemask) __setjmp(env, savemask)
36 int siglongjmp(sigjmp_buf _env, int _val);
39 #endif /* _SETJMP_H */