1 #ifndef ETHERBOOT_SETJMP_H
2 #define ETHERBOOT_SETJMP_H
4 FILE_LICENCE ( GPL2_OR_LATER
);
19 /** A real-mode-extended jump buffer */
26 extern int __asmcall
setjmp ( jmp_buf env
);
27 extern void __asmcall
longjmp ( jmp_buf env
, int val
);
29 #define rmsetjmp( _env ) ( { \
30 (_env)->rm_ss = rm_ss; \
31 (_env)->rm_sp = rm_sp; \
32 setjmp ( (_env)->env ); } ) \
34 #define rmlongjmp( _env, _val ) do { \
35 rm_ss = (_env)->rm_ss; \
36 rm_sp = (_env)->rm_sp; \
37 longjmp ( (_env)->env, (_val) ); \
40 #endif /* ETHERBOOT_SETJMP_H */