xref: /haiku/headers/posix/setjmp.h (revision 93aeb8c3bc3f13cb1f282e3e749258a23790d947)
1 /*
2  * Copyright 2004-2005, Haiku, Inc.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _SETJMP_H_
6 #define _SETJMP_H_
7 
8 
9 #include <signal.h>
10 
11 
12 typedef struct __jmp_buf {
13 	int			regs[6];	/* saved registers, stack & program pointer */
14 	int			mask_was_saved;
15 	sigset_t	saved_mask;
16 } jmp_buf[1];
17 
18 typedef jmp_buf sigjmp_buf;
19 
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 extern int	_setjmp(jmp_buf jumpBuffer);
26 extern int	setjmp(jmp_buf jumpBuffer);
27 extern int	sigsetjmp(jmp_buf jumpBuffer, int saveMask);
28 
29 extern void	_longjmp(jmp_buf jumpBuffer, int value);
30 extern void	longjmp(jmp_buf jumpBuffer, int value);
31 extern void	siglongjmp(sigjmp_buf jumpBuffer, int value);
32 
33 #ifdef __cplusplus
34 }
35 #endif
36 
37 #endif /* _SETJMP_H_ */
38