From: Roland McGrath Date: Sun, 4 Dec 1994 18:08:19 +0000 (+0000) Subject: Implement __sigsetjmp_aux instead of __setjmp_aux; call __sigjmp_save. X-Git-Tag: glibc-2.16-ports-before-merge~4020 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3adc78aced7e0a3caf6c5521a5737f39df3af8c1;p=thirdparty%2Fglibc.git Implement __sigsetjmp_aux instead of __setjmp_aux; call __sigjmp_save. --- diff --git a/sysdeps/alpha/setjmp_aux.c b/sysdeps/alpha/setjmp_aux.c index 9a67a6b7999..031c5a56db8 100644 --- a/sysdeps/alpha/setjmp_aux.c +++ b/sysdeps/alpha/setjmp_aux.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,13 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/*#include */ -#include "jmp_buf.h" -#define jmp_buf __jmp_buf - -#ifndef __GNUC__ -#error This file uses GNU C extensions; you must compile with GCC. -#endif +/* Global register decls must come before any function defn. */ register long int r9 asm ("$9"), r10 asm ("$10"), r11 asm ("$11"), r12 asm ("$12"), @@ -36,9 +30,13 @@ register double f6 asm ("$f6"), f7 asm ("$f7"), f8 asm ("$f8"), f9 asm ("$f9"); #endif + +#include + + /* Save the current program position in ENV and return 0. */ int -__setjmp_aux (jmp_buf env, long int *sp, long int *fp) +__sigsetjmp_aux (sigjmp_buf env, int savemask, long int *sp, long int *fp) { /* Save the integer registers. */ env[0].__9 = r9; @@ -63,11 +61,14 @@ __setjmp_aux (jmp_buf env, long int *sp, long int *fp) /* Save the return address of our caller, where longjmp will jump to. */ env[0].__pc = retpc; - /* Save the FP and SP of our caller. The __setjmp entry point - simply puts these in the argument register for us to fetch. */ + /* Save the FP and SP of our caller. The __sigsetjmp entry point + simply puts these in the argument registers for us to fetch. */ env[0].__fp = fp; env[0].__sp = sp; - /* Return to the original caller of __setjmp. */ + /* Save the signal mask if requested. */ + __sigjmp_save (env, savemask); + + /* Return to the original caller of __sigsetjmp. */ return 0; }