setjmp.h revision 104493
1104493Smike/*-
232411Sjb * Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>.
332411Sjb * All rights reserved.
432411Sjb *
532411Sjb * Redistribution and use in source and binary forms, with or without
632411Sjb * modification, are permitted provided that the following conditions
732411Sjb * are met:
832411Sjb * 1. Redistributions of source code must retain the above copyright
932411Sjb *    notice, this list of conditions and the following disclaimer.
1032411Sjb * 2. Redistributions in binary form must reproduce the above copyright
1132411Sjb *    notice, this list of conditions and the following disclaimer in the
1232411Sjb *    documentation and/or other materials provided with the distribution.
1332411Sjb * 3. All advertising materials mentioning features or use of this software
1432411Sjb *    must display the following acknowledgement:
1532411Sjb *	This product includes software developed by John Birrell.
1632411Sjb * 4. Neither the name of the author nor the names of any co-contributors
1732411Sjb *    may be used to endorse or promote products derived from this software
1832411Sjb *    without specific prior written permission.
1932411Sjb *
2032411Sjb * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
2132411Sjb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2232411Sjb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2332411Sjb * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2432411Sjb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2532411Sjb * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2632411Sjb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2732411Sjb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2832411Sjb * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2932411Sjb * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3032411Sjb * SUCH DAMAGE.
3132411Sjb *
32104493Smike * $FreeBSD: head/sys/amd64/include/setjmp.h 104493 2002-10-04 22:10:06Z mike $
3332411Sjb */
3432411Sjb
35104493Smike#ifndef _MACHINE_SETJMP_H_
36104493Smike#define	_MACHINE_SETJMP_H_
37104493Smike
3851792Smarcel#define	_JBLEN	11		/* Size of the jmp_buf on x86. */
3932641Sjb
4032641Sjb/*
4132641Sjb * jmp_buf and sigjmp_buf are encapsulated in different structs to force
4232641Sjb * compile-time diagnostics for mismatches.  The structs are the same
4332641Sjb * internally to avoid some run-time errors for mismatches.
4432641Sjb */
4532641Sjb#ifndef _ANSI_SOURCE
46104493Smiketypedef	struct _sigjmp_buf { int _sjb[_JBLEN + 1]; } sigjmp_buf[1];
47104493Smike#endif
4832641Sjb
49104493Smiketypedef	struct _jmp_buf { int _jb[_JBLEN + 1]; } jmp_buf[1];
50104493Smike
51104493Smike#endif /* !_MACHINE_SETJMP_H_ */
52