2005-11-13 20:54:18 +03:00
|
|
|
/*
|
2012-07-19 22:11:40 +04:00
|
|
|
* Copyright 2004-2012 Haiku, Inc.
|
2005-11-13 20:54:18 +03:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2004-10-05 17:06:36 +04:00
|
|
|
#ifndef _SETJMP_H_
|
|
|
|
#define _SETJMP_H_
|
|
|
|
|
2009-11-24 22:44:07 +03:00
|
|
|
|
|
|
|
#include <config/HaikuConfig.h>
|
|
|
|
|
2004-10-05 17:06:36 +04:00
|
|
|
#include <signal.h>
|
|
|
|
|
2008-05-11 01:30:34 +04:00
|
|
|
/* include architecture specific definitions */
|
2009-11-24 22:44:07 +03:00
|
|
|
#include __HAIKU_ARCH_HEADER(arch_setjmp.h)
|
2004-10-05 17:06:36 +04:00
|
|
|
|
2005-12-11 01:56:52 +03:00
|
|
|
typedef struct __jmp_buf_tag {
|
|
|
|
__jmp_buf regs; /* saved registers, stack & program pointer */
|
2011-06-12 04:00:23 +04:00
|
|
|
sigset_t inverted_signal_mask;
|
2004-10-05 17:06:36 +04:00
|
|
|
} jmp_buf[1];
|
|
|
|
|
|
|
|
typedef jmp_buf sigjmp_buf;
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern int _setjmp(jmp_buf jumpBuffer);
|
|
|
|
extern int setjmp(jmp_buf jumpBuffer);
|
|
|
|
extern int sigsetjmp(jmp_buf jumpBuffer, int saveMask);
|
|
|
|
|
|
|
|
extern void _longjmp(jmp_buf jumpBuffer, int value);
|
|
|
|
extern void longjmp(jmp_buf jumpBuffer, int value);
|
|
|
|
extern void siglongjmp(sigjmp_buf jumpBuffer, int value);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _SETJMP_H_ */
|