setjmp.h 924 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* Define the machine-dependent type `jmp_buf'. i960 version. */
  2. #ifndef _BITS_SETJMP_H
  3. #define _BITS_SETJMP_H 1
  4. #if !defined _SETJMP_H && !defined _PTHREAD_H
  5. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  6. #endif
  7. /*
  8. * assume that every single local and global register
  9. * must be saved.
  10. *
  11. * ___SAVEREGS is the number of quads to save.
  12. *
  13. * Using the structure will guarantee quad-word alignment for the
  14. * jmp_buf type.
  15. */
  16. #define ___SAVEREGS 8
  17. typedef struct __jmp_buf__ {
  18. long _q0;
  19. long _q1;
  20. long _q2;
  21. long _q3;
  22. } __attribute__ ((aligned (16))) __jmp_buf[___SAVEREGS] ;
  23. /* I have not yet figured out what this should be for the i960... */
  24. #if 0
  25. /* Test if longjmp to JMPBUF would unwind the frame
  26. containing a local variable at ADDRESS. */
  27. #define _JMPBUF_UNWINDS(jmpbuf, address) \
  28. ((void *) (address) < (void *) (jmpbuf)[0].__sp)
  29. #endif
  30. #endif /* bits/setjmp.h */