libclayer/include/setjmp.h

27 lines
524 B
C
Raw Normal View History

2022-12-25 08:58:00 +00:00
#ifndef _SETJMP_H
#define _SETJMP_H 1
#ifdef __cplusplus
extern "C" {
#endif
2022-12-25 11:23:09 +00:00
#include <libclayer.h>
2022-12-25 08:58:00 +00:00
// TODO: define in architecture-specific header
typedef unsigned long __jmp_buf[sizeof(long) == 8 ? 8 : 6];
typedef struct __jmp_buf_tag {
__jmp_buf __jb;
unsigned long __fl;
unsigned long __ss[128 / sizeof(long)];
} jmp_buf[1];
2022-12-25 11:23:09 +00:00
int LIBCLAYER(setjmp)(jmp_buf env) __attribute__((returns_twice));
void LIBCLAYER(longjmp)(jmp_buf env, int val) __attribute__((noreturn));
2022-12-25 08:58:00 +00:00
#ifdef __cplusplus
}
#endif
#endif