/* $Id: signal32.c,v 1.74 2002/02/09 19:49:30 davem Exp $ * arch/sparc64/kernel/signal32.c * * Copyright (C) 1991, 1992 Linus Torvalds * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) */#include<linux/sched.h>#include<linux/kernel.h>#include<linux/signal.h>#include<linux/errno.h>#include<linux/wait.h>#include<linux/ptrace.h>#include<linux/unistd.h>#include<linux/mm.h>#include<linux/tty.h>#include<linux/binfmts.h>#include<linux/compat.h>#include<linux/bitops.h>#include<asm/uaccess.h>#include<asm/ptrace.h>#include<asm/svr4.h>#include<asm/pgtable.h>#include<asm/psrcompat.h>#include<asm/fpumacro.h>#include<asm/visasm.h>#include<asm/compat_signal.h>#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))/* Signal frames: the original one (compatible with SunOS): * * Set up a signal frame... Make the stack look the way SunOS * expects it to look which is basically: * * ---------------------------------- <-- %sp at signal time * Struct sigcontext * Signal address * Ptr to sigcontext area above * Signal code * The signal number itself * One register window * ---------------------------------- <-- New %sp */structsignal_sframe32{structreg_window32sig_window;intsig_num;intsig_code;/* struct sigcontext32 * */u32sig_scptr;intsig_address;structsigcontext32sig_context;unsignedintextramask[_COMPAT_NSIG_WORDS-1];};/* This magic should be in g_upper[0] for all upper parts * to be valid. */#define SIGINFO_EXTRA_V8PLUS_MAGIC 0x130e269typedefstruct{unsignedintg_upper[8];unsignedinto_upper[8];unsignedintasi;}siginfo_extra_v8plus_t;/* * And the new one, intended to be used for Linux applications only * (we have enough in there to work with clone). * All the interesting bits are in the info field. */structnew_signal_frame32{structsparc_stackf32ss;__siginfo32_tinfo;/* __siginfo_fpu32_t * */u32fpu_save;unsignedintinsns[2];unsignedintextramask[_COMPAT_NSIG_WORDS-1];unsignedintextra_size;/* Should be sizeof(siginfo_extra_v8plus_t) *//* Only valid if (info.si_regs.psr & (PSR_VERS|PSR_IMPL)) == PSR_V8PLUS */siginfo_extra_v8plus_tv8plus;__siginfo_fpu_tfpu_state;};typedefstruct