1/* 2 * Copyright (c) 2000-2007 Apple Inc. All rights reserved. 3 */ 4/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. 5 * 6 * File: setjmp.h 7 * 8 * Declaration of setjmp routines and data structures. 9 */ 10#ifndef _BSD_ARM_SETJMP_H 11#define _BSD_ARM_SETJMP_H 12 13#include <sys/cdefs.h> 14#include <machine/signal.h> 15 16/* 17 * _JBLEN is number of ints required to save the following: 18 * r4-r8, r10, fp, sp, lr, sig == 10 register_t sized 19 * s16-s31 == 16 register_t sized + 1 int for FSTMX 20 * 1 extra int for future use 21 */ 22#define _JBLEN (10 + 16 + 2) 23#define _JBLEN_MAX _JBLEN 24 25typedef int jmp_buf[_JBLEN]; 26typedef int sigjmp_buf[_JBLEN + 1]; 27 28__BEGIN_DECLS 29extern int setjmp(jmp_buf env); 30extern void longjmp(jmp_buf env, int val); 31 32#ifndef _ANSI_SOURCE 33int _setjmp(jmp_buf env); 34void _longjmp(jmp_buf, int val); 35int sigsetjmp(sigjmp_buf env, int val); 36void siglongjmp(sigjmp_buf env, int val); 37#endif /* _ANSI_SOURCE */ 38 39#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) 40void longjmperror(void); 41#endif /* neither ANSI nor POSIX */ 42__END_DECLS 43#endif /* !_BSD_ARM_SETJMP_H */ 44