2022-06-12 13:41:11 +00:00
|
|
|
#ifndef _SETJMP_H
|
|
|
|
#define _SETJMP_H 1
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2022-06-14 14:59:08 +00:00
|
|
|
// TODO: define in architecture-specific header
|
|
|
|
typedef unsigned long __jmp_buf[sizeof(long) == 8 ? 8 : 6];
|
2022-06-12 13:41:11 +00:00
|
|
|
|
2022-06-14 14:59:08 +00:00
|
|
|
typedef struct __jmp_buf_tag {
|
|
|
|
__jmp_buf __jb;
|
|
|
|
unsigned long __fl;
|
|
|
|
unsigned long __ss[128 / sizeof(long)];
|
|
|
|
} jmp_buf[1];
|
|
|
|
|
|
|
|
__attribute__((returns_twice))
|
2022-06-12 13:41:11 +00:00
|
|
|
int setjmp(jmp_buf env);
|
2022-06-14 14:59:08 +00:00
|
|
|
|
|
|
|
__attribute__((noreturn))
|
2022-06-12 13:41:11 +00:00
|
|
|
void longjmp(jmp_buf env, int val);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|