modernc.org/cc@v1.0.1/v2/headers/linux_arm/usr/include/setjmp.h (about)

     1  /* Copyright (C) 1991-2016 Free Software Foundation, Inc.
     2     This file is part of the GNU C Library.
     3  
     4     The GNU C Library is free software; you can redistribute it and/or
     5     modify it under the terms of the GNU Lesser General Public
     6     License as published by the Free Software Foundation; either
     7     version 2.1 of the License, or (at your option) any later version.
     8  
     9     The GNU C Library is distributed in the hope that it will be useful,
    10     but WITHOUT ANY WARRANTY; without even the implied warranty of
    11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    12     Lesser General Public License for more details.
    13  
    14     You should have received a copy of the GNU Lesser General Public
    15     License along with the GNU C Library; if not, see
    16     <http://www.gnu.org/licenses/>.  */
    17  
    18  /*
    19   *	ISO C99 Standard: 7.13 Nonlocal jumps	<setjmp.h>
    20   */
    21  
    22  #ifndef	_SETJMP_H
    23  #define	_SETJMP_H	1
    24  
    25  #include <features.h>
    26  
    27  __BEGIN_DECLS
    28  #include <bits/setjmp.h>	/* Get `__jmp_buf'.  */
    29  #include <bits/sigset.h>	/* Get `__sigset_t'.  */
    30  /* Calling environment, plus possibly a saved signal mask.  */
    31      struct __jmp_buf_tag {
    32  	/* NOTE: The machine-dependent definitions of `__sigsetjmp'
    33  	   assume that a `jmp_buf' begins with a `__jmp_buf' and that
    34  	   `__mask_was_saved' follows it.  Do not move these members
    35  	   or add others before it.  */
    36  	__jmp_buf __jmpbuf;	/* Calling environment.  */
    37  	int __mask_was_saved;	/* Saved the signal mask?  */
    38  	__sigset_t __saved_mask;	/* Saved signal mask.  */
    39  };
    40  
    41  __BEGIN_NAMESPACE_STD typedef struct __jmp_buf_tag jmp_buf[1];
    42  
    43  /* Store the calling environment in ENV, also saving the signal mask.
    44     Return 0.  */
    45  extern int setjmp(jmp_buf __env) __THROWNL;
    46  
    47  __END_NAMESPACE_STD
    48  /* Store the calling environment in ENV, also saving the
    49     signal mask if SAVEMASK is nonzero.  Return 0.
    50     This is the internal name for `sigsetjmp'.  */
    51  extern int __sigsetjmp(struct __jmp_buf_tag __env[1], int __savemask) __THROWNL;
    52  
    53  /* Store the calling environment in ENV, not saving the signal mask.
    54     Return 0.  */
    55  extern int _setjmp(struct __jmp_buf_tag __env[1]) __THROWNL;
    56  
    57  /* Do not save the signal mask.  This is equivalent to the `_setjmp'
    58     BSD function.  */
    59  #define setjmp(env)	_setjmp (env)
    60  
    61  __BEGIN_NAMESPACE_STD
    62  /* Jump to the environment saved in ENV, making the
    63     `setjmp' call there return VAL, or 1 if VAL is 0.  */
    64  extern void longjmp(struct __jmp_buf_tag __env[1], int __val)
    65  __THROWNL __attribute__ ((__noreturn__));
    66  
    67  __END_NAMESPACE_STD
    68  #if defined __USE_MISC || defined __USE_XOPEN
    69  /* Same.  Usually `_longjmp' is used with `_setjmp', which does not save
    70     the signal mask.  But it is how ENV was saved that determines whether
    71     `longjmp' restores the mask; `_longjmp' is just an alias.  */
    72  extern void _longjmp(struct __jmp_buf_tag __env[1], int __val)
    73  __THROWNL __attribute__ ((__noreturn__));
    74  #endif
    75  
    76  #ifdef	__USE_POSIX
    77  /* Use the same type for `jmp_buf' and `sigjmp_buf'.
    78     The `__mask_was_saved' flag determines whether
    79     or not `longjmp' will restore the signal mask.  */
    80  typedef struct __jmp_buf_tag sigjmp_buf[1];
    81  
    82  /* Store the calling environment in ENV, also saving the
    83     signal mask if SAVEMASK is nonzero.  Return 0.  */
    84  #define sigsetjmp(env, savemask)	__sigsetjmp (env, savemask)
    85  
    86  /* Jump to the environment saved in ENV, making the
    87     sigsetjmp call there return VAL, or 1 if VAL is 0.
    88     Restore the signal mask if that sigsetjmp call saved it.
    89     This is just an alias `longjmp'.  */
    90  extern void siglongjmp(sigjmp_buf __env, int __val)
    91  __THROWNL __attribute__ ((__noreturn__));
    92  #endif				/* Use POSIX.  */
    93  
    94  /* Define helper functions to catch unsafe code.  */
    95  #if __USE_FORTIFY_LEVEL > 0
    96  #include <bits/setjmp2.h>
    97  #endif
    98  
    99  __END_DECLS
   100  #endif				/* setjmp.h  */