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.
13165967Simp * 3. Neither the name of the author nor the names of any co-contributors
1432411Sjb *    may be used to endorse or promote products derived from this software
1532411Sjb *    without specific prior written permission.
1632411Sjb *
1732411Sjb * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
1832411Sjb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1932411Sjb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2032411Sjb * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2132411Sjb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2232411Sjb * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2332411Sjb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2432411Sjb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2532411Sjb * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2632411Sjb * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2732411Sjb * SUCH DAMAGE.
2832411Sjb *
29104493Smike * $FreeBSD$
3032411Sjb */
3132411Sjb
32104493Smike#ifndef _MACHINE_SETJMP_H_
33104493Smike#define	_MACHINE_SETJMP_H_
34104493Smike
35104505Smike#include <sys/cdefs.h>
36104505Smike
37115734Speter#define	_JBLEN	12		/* Size of the jmp_buf on AMD64. */
3832641Sjb
3932641Sjb/*
4032641Sjb * jmp_buf and sigjmp_buf are encapsulated in different structs to force
4132641Sjb * compile-time diagnostics for mismatches.  The structs are the same
4232641Sjb * internally to avoid some run-time errors for mismatches.
4332641Sjb */
44104505Smike#if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE
45115734Spetertypedef	struct _sigjmp_buf { long _sjb[_JBLEN]; } sigjmp_buf[1];
46104493Smike#endif
4732641Sjb
48115734Spetertypedef	struct _jmp_buf { long _jb[_JBLEN]; } jmp_buf[1];
49104493Smike
50104493Smike#endif /* !_MACHINE_SETJMP_H_ */
51