setjmp.h 655 B

123456789101112131415161718192021222324
  1. #ifndef _BITS_SETJMP_H
  2. #define _BITS_SETJMP_H 1
  3. #if !defined _SETJMP_H && !defined _PTHREAD_H
  4. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  5. #endif
  6. #ifndef _ASM
  7. typedef struct
  8. {
  9. int __regs[15]; /* callee-saved registers r11-r25 */
  10. void *__gp; /* global pointer */
  11. void *__fp; /* frame pointer */
  12. void *__sp; /* stack pointer */
  13. void *__ra; /* return address */
  14. } __jmp_buf[1];
  15. #endif
  16. /* Test if longjmp to JMPBUF would unwind the frame
  17. containing a local variable at ADDRESS. */
  18. #define _JMPBUF_UNWINDS(jmpbuf, address) \
  19. ((void *) (address) < (void *) (jmpbuf)[0].__sp)
  20. #endif