#ifndef SETJMP_H #define SETJMP_H #include "stdint.h" // C99 states this should be an array so we can address it without // the & operator, see prototypes of setjmp and longjmp // eax, ecx and edx are scratch registers, save the others // also store the jump address (eip) typedef struct { uint32_t ebx; uint32_t esp; uint32_t ebp; uint32_t esi; uint32_t edi; uint32_t eip; } jmp_buf[1]; int setjmp( jmp_buf env ); void longjmp( jmp_buf env, int val ); #endif // SETJMP_H