setjmp.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * libc/sysdeps/linux/v850/bits/setjmp.h -- v850 version of `jmp_buf' type
  3. *
  4. * Copyright (C) 2001 NEC Corporation
  5. * Copyright (C) 2001 Miles Bader <miles@gnu.org>
  6. *
  7. * This file is subject to the terms and conditions of the GNU Lesser
  8. * General Public License. See the file COPYING.LIB in the main
  9. * directory of this archive for more details.
  10. *
  11. * Written by Miles Bader <miles@gnu.org>
  12. */
  13. #ifndef _BITS_SETJMP_H
  14. #define _BITS_SETJMP_H 1
  15. #if !defined _SETJMP_H && !defined _PTHREAD_H
  16. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  17. #endif
  18. #ifndef _ASM
  19. typedef struct
  20. {
  21. /* Stack pointer. */
  22. void *__sp;
  23. /* Link pointer. */
  24. void *__lp;
  25. /* Callee-saved registers r2 and r20-r29. */
  26. int __regs[11];
  27. } __jmp_buf[1];
  28. #endif
  29. #define JB_SIZE (4 * 13)
  30. /* Test if longjmp to JMPBUF would unwind the frame
  31. containing a local variable at ADDRESS. */
  32. #define _JMPBUF_UNWINDS(jmpbuf, address) \
  33. ((void *) (address) < (void *) (jmpbuf)[0].__sp)
  34. #endif /* bits/setjmp.h */