android_kernel_xiaomi_sm8350/arch/um/include/longjmp.h
Jeff Dike ad28e02978 [PATCH] uml: change sigjmp_buf to jmp_buf
Clean up the jmpbuf code.  Since softints, we no longer use sig_setjmp, so
the UML_SIGSETJMP wrapper now has a misleading name.  Also, I forgot to
change the buffers from sigjmp_buf to jmp_buf.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:51 -07:00

20 lines
307 B
C

#ifndef __UML_LONGJMP_H
#define __UML_LONGJMP_H
#include <setjmp.h>
#include "os.h"
#define UML_LONGJMP(buf, val) do { \
longjmp(*buf, val); \
} while(0)
#define UML_SETJMP(buf, enable) ({ \
int n; \
enable = get_signals(); \
n = setjmp(*buf); \
if(n != 0) \
set_signals(enable); \
n; })
#endif