xref: /kvm-unit-tests/lib/setjmp.h (revision 1c49a8120bdf60d4fc2534385d96aad2e400635f)
1 /*
2  * setjmp/longjmp prototypes
3  *
4  * This code is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU Library General Public License version 2.
6  */
7 #ifndef _LIBCFLAT_SETJMP_H_
8 #define _LIBCFLAT_SETJMP_H_
9 
10 typedef struct jmp_buf_tag {
11 #if defined(__i386__) || defined(__x86_64__)
12 	long int regs[8];
13 #elif defined(__riscv)
14 	long int regs[16];
15 #endif
16 } jmp_buf[1];
17 
18 extern int setjmp (struct jmp_buf_tag env[1]);
19 extern void longjmp (struct jmp_buf_tag env[1], int val)
20      __attribute__ ((__noreturn__));
21 
22 #endif /* setjmp.h  */
23