1
0

setjmp.h 499 B

1234567891011121314151617181920212223242526
  1. #ifndef __SETJMP_H
  2. #define __SETJMP_H
  3. typedef struct {
  4. unsigned long eax;
  5. unsigned long ebx;
  6. unsigned long ecx;
  7. unsigned long edx;
  8. unsigned long esi;
  9. unsigned long edi;
  10. unsigned long ebp;
  11. unsigned long esp;
  12. unsigned long eip;
  13. } jmp_buf;
  14. #define setjmp(env) (__handles->platform_setjmp(&(env)))
  15. void longjmp(jmp_buf env, int status);
  16. #include "asmc.h"
  17. void longjmp(jmp_buf env, int status) {
  18. if (status == 0) status = 1;
  19. __handles->platform_longjmp(&env, status);
  20. }
  21. #endif