fxlibc/include/setjmp.h

31 lines
654 B
C

#ifndef __SETJMP_H__
# define __SETJMP_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include <stdint.h>
#include <bits/setjmp.h>
/* Make jmp_buf an array type. (7.13§2) */
typedef struct __jmp_buf jmp_buf[1];
/* Save the calling environment in __env (not the signal mask), return 0. */
__attribute__((returns_twice))
extern int setjmp(jmp_buf __env);
/* Standard requires setjmp to be a macro (7.13§1) */
#define setjmp setjmp
/* Restore the calling environment from __env, return __val to setjmp. */
__attribute__((noreturn))
extern void longjmp(jmp_buf __env, int __val);
#ifdef __cplusplus
}
#endif
#endif /*__SETJMP_H__*/