machine/setjmp.h

Go to the documentation of this file.
00001 /*-
00002  * Copyright (c) 1998 John Birrell <[email protected]>.
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * 3. All advertising materials mentioning features or use of this software
00014  *    must display the following acknowledgement:
00015  *      This product includes software developed by John Birrell.
00016  * 4. Neither the name of the author nor the names of any co-contributors
00017  *    may be used to endorse or promote products derived from this software
00018  *    without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
00021  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00022  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00023  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00024  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00025  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00026  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00027  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00028  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00029  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00030  * SUCH DAMAGE.
00031  *
00032  * $FreeBSD: src/sys/i386/include/setjmp.h,v 1.7 2002/10/05 05:47:55 mike Exp $
00033  */
00034 
00035 #ifndef _MACHINE_SETJMP_H_
00036 #define _MACHINE_SETJMP_H_
00037 
00038 #include <sys/cdefs.h>
00039 
00040 #ifdef __SYMBIAN32__
00041 #define _JBLEN  16              
00042 #else
00043 #define _JBLEN  11              /* Size of the jmp_buf on x86. */
00044 //__SYMBIAN32__
00045 #endif
00046 /*
00047  * jmp_buf and sigjmp_buf are encapsulated in different structs to force
00048  * compile-time diagnostics for mismatches.  The structs are the same
00049  * internally to avoid some run-time errors for mismatches.
00050  */
00051 #if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE
00052 typedef struct _sigjmp_buf { int _sjb[_JBLEN + 1]; } sigjmp_buf[1];
00053 #endif
00054 
00055 #ifdef __SYMBIAN32__
00056 #define _JBTYPE unsigned long
00057 typedef _JBTYPE jmp_buf[_JBLEN];
00058 #else
00059 typedef struct _jmp_buf { int _jb[_JBLEN + 1]; } jmp_buf[1];
00060 //__SYMBIAN32__
00061 #endif
00062 
00063 #endif /* !_MACHINE_SETJMP_H_ */

Copyright © Nokia Corporation 2001-2008
Back to top