Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / um / include / shared / longjmp.h
blobb3315c1f198bede97a50bd8d9c9743d261710cd7
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __UML_LONGJMP_H
3 #define __UML_LONGJMP_H
5 #include <sysdep/archsetjmp.h>
6 #include <os.h>
8 extern int setjmp(jmp_buf);
9 extern void longjmp(jmp_buf, int);
11 #define UML_LONGJMP(buf, val) do { \
12 longjmp(*buf, val); \
13 } while(0)
15 #define UML_SETJMP(buf) ({ \
16 int n; \
17 volatile int enable; \
18 enable = get_signals(); \
19 n = setjmp(*buf); \
20 if(n != 0) \
21 set_signals(enable); \
22 n; })
24 #endif