summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/lm32/bits/setjmp.h
blob: 6798083bd225a2d6a8bedc71ffb3109d3d6b8aeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef _BITS_SETJMP_H
#define _BITS_SETJMP_H	1

#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif

#ifndef _ASM
typedef struct
  {
    int __regs[15]; /* callee-saved registers r11-r25 */
    void *__gp;     /* global pointer */
    void *__fp;     /* frame pointer */
    void *__sp;     /* stack pointer */
    void *__ra;     /* return address */
  } __jmp_buf[1];
#endif

/* Test if longjmp to JMPBUF would unwind the frame
   containing a local variable at ADDRESS.  */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
  ((void *) (address) < (void *) (jmpbuf)[0].__sp)

#endif