OSDN Git Service

93395ade404bb556e0f68dde282937d059bd7d7e
[uclinux-h8/uClibc.git] / libc / sysdeps / linux / v850 / bits / setjmp.h
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
14 #ifndef _BITS_SETJMP_H
15 #define _BITS_SETJMP_H  1
16
17 #if !defined _SETJMP_H && !defined _PTHREAD_H
18 # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
19 #endif
20
21 #ifndef _ASM
22 typedef struct
23   {
24     /* Stack pointer.  */
25     void *__sp;
26
27     /* Link pointer.  */
28     void *__lp;
29
30     /* Callee-saved registers r2 and r20-r29.  */
31     int __regs[11];
32   } __jmp_buf[1];
33 #endif
34
35 #define JB_SIZE         (4 * 13)
36
37 /* Test if longjmp to JMPBUF would unwind the frame
38    containing a local variable at ADDRESS.  */
39 #define _JMPBUF_UNWINDS(jmpbuf, address) \
40   ((void *) (address) < (void *) (jmpbuf)[0].__sp)
41
42 #endif  /* bits/setjmp.h */