NEWS: Add comment about changed ABI on s390 and s390x.
[glibc.git] / sysdeps / s390 / v1-longjmp.c
blob82252c901e50f4abefe69887a9aeb85bf8f0f2c5
1 /* Copyright (C) 2013 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
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.
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.
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/>.
18 Versioned copy of sysdeps/generic/longjmp.c modified for extended
19 jmpbuf. */
21 #include <shlib-compat.h>
22 #include <stddef.h>
23 #include <signal.h>
24 #include "v1-setjmp.h"
26 #if !defined NOT_INT_libc && defined SHARED
27 # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_19)
29 void
30 __v1__libc_siglongjmp (__v1__sigjmp_buf env, int val)
32 /* Perform any cleanups needed by the frames being unwound. */
33 _longjmp_unwind (env, val);
35 if (env[0].__mask_was_saved)
36 /* Restore the saved signal mask. */
37 (void) __sigprocmask (SIG_SETMASK, &env[0].__saved_mask,
38 (sigset_t *) NULL);
40 /* Call the machine-dependent function to restore machine state. */
41 __v1__longjmp (env[0].__jmpbuf, val ?: 1);
44 # ifndef __v1__longjmp
45 strong_alias (__v1__libc_siglongjmp, __v1__libc_longjmp)
46 libc_hidden_def (__v1__libc_longjmp)
47 weak_alias (__v1__libc_siglongjmp, __v1_longjmp)
48 weak_alias (__v1__libc_siglongjmp, __v1longjmp)
49 weak_alias (__v1__libc_siglongjmp, __v1siglongjmp)
51 compat_symbol (libc, __v1_longjmp, _longjmp, GLIBC_2_0);
52 compat_symbol (libc, __v1longjmp, longjmp, GLIBC_2_0);
53 compat_symbol (libc, __v1siglongjmp, siglongjmp, GLIBC_2_0);
55 # endif /* ifndef __v1__longjmp */
56 # endif /* SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_19) */
57 #endif /* if !defined NOT_INT_libc && defined SHARED */