fxlibc/include/setjmp.h

31 lines
654 B
C
Raw Normal View History

2021-05-09 23:00:11 +02:00
#ifndef __SETJMP_H__
# define __SETJMP_H__
2020-09-17 19:27:01 +02:00
2021-06-28 15:49:05 +02:00
#ifdef __cplusplus
extern "C" {
#endif
2020-09-17 19:27:01 +02:00
#include <stddef.h>
#include <stdint.h>
2021-05-09 16:35:40 +02:00
#include <bits/setjmp.h>
2020-09-17 19:27:01 +02:00
/* Make jmp_buf an array type. (7.13§2) */
2020-09-17 19:27:01 +02:00
typedef struct __jmp_buf jmp_buf[1];
/* Save the calling environment in __env (not the signal mask), return 0. */
2021-05-30 08:59:06 +02:00
__attribute__((returns_twice))
extern int setjmp(jmp_buf __env);
2021-05-16 18:01:55 +02:00
/* Standard requires setjmp to be a macro (7.13§1) */
#define setjmp setjmp
/* Restore the calling environment from __env, return __val to setjmp. */
2021-05-30 08:59:06 +02:00
__attribute__((noreturn))
extern void longjmp(jmp_buf __env, int __val);
2020-09-17 19:27:01 +02:00
2021-06-28 15:49:05 +02:00
#ifdef __cplusplus
}
#endif
2021-05-09 23:00:11 +02:00
#endif /*__SETJMP_H__*/