Back to index

glibc  2.9
setjmp.h
Go to the documentation of this file.
00001 /* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 /* Define the machine-dependent type `jmp_buf', CRIS version.  */
00020 
00021 /* Note that saving and restoring CCR has no meaning in user mode, so we
00022    don't actually do it; the slot is now reserved.
00023 
00024    jmp_buf[0] - PC
00025    jmp_buf[1] - SP (R14)
00026    jmp_buf[2] - R13
00027    jmp_buf[3] - R12
00028    jmp_buf[4] - R11
00029    jmp_buf[5] - R10
00030    jmp_buf[6] - R9
00031    jmp_buf[7] - R8
00032    jmp_buf[8] - R7
00033    jmp_buf[9] - R6
00034    jmp_buf[10] - R5
00035    jmp_buf[11] - R4
00036    jmp_buf[12] - R3
00037    jmp_buf[13] - R2
00038    jmp_buf[14] - R1
00039    jmp_buf[15] - R0
00040    jmp_buf[16] - SRP
00041    jmp_buf[17] - CCR  */
00042 
00043 #ifndef       _ASM
00044 typedef unsigned long int __jmp_buf[18];
00045 #endif
00046 
00047 #if    defined (__USE_MISC) || defined (_ASM)
00048 #define JB_SP 1
00049 #endif
00050 
00051 /* Test if longjmp to JMPBUF would unwind the frame
00052    containing a local variable at ADDRESS.  */
00053 #define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
00054   ((unsigned long int) (address) < demangle ((jmpbuf)[JB_SP]))