OSDN Git Service

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