setjmp.h 1.1 KB

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