2021-05-09 23:00:11 +02:00
|
|
|
#ifndef __SETJMP_H__
|
|
|
|
# define __SETJMP_H__
|
2020-09-17 19:27:01 +02:00
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2020-10-14 11:45:08 +02:00
|
|
|
/* Get '__jmp_buf' */
|
2021-05-09 16:35:40 +02:00
|
|
|
#include <bits/setjmp.h>
|
2020-09-17 19:27:01 +02:00
|
|
|
|
2020-10-14 11:45:08 +02:00
|
|
|
/* User jmp_buf alias */
|
2020-09-17 19:27:01 +02:00
|
|
|
typedef struct __jmp_buf jmp_buf[1];
|
|
|
|
|
|
|
|
|
2020-10-14 11:45:08 +02:00
|
|
|
/*
|
|
|
|
** Store the calling environment in ENV, also saving the signal mask.
|
|
|
|
** Return 0.
|
|
|
|
*/
|
2020-09-17 19:27:01 +02:00
|
|
|
extern int setjmp(jmp_buf env);
|
2020-10-14 11:45:08 +02:00
|
|
|
|
2021-05-16 18:01:55 +02:00
|
|
|
/* Standard requires setjmp to be a macro (7.13§1) */
|
|
|
|
#define setjmp setjmp
|
|
|
|
|
2020-10-14 11:45:08 +02:00
|
|
|
/*
|
|
|
|
** Store the calling environment in ENV, not saving the signal mask.
|
|
|
|
** Return 0.
|
|
|
|
*/
|
2020-09-17 19:27:01 +02:00
|
|
|
extern void longjmp(jmp_buf env, int val);
|
|
|
|
|
2021-05-09 23:00:11 +02:00
|
|
|
#endif /*__SETJMP_H__*/
|