fxlibc/include/setjmp.h
2021-05-30 15:09:33 +02:00

22 lines
585 B
C

#ifndef __SETJMP_H__
# define __SETJMP_H__
#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);
#endif /*__SETJMP_H__*/