Back to index

glibc  2.9
sigcontext.h
Go to the documentation of this file.
00001 /* Copyright (C) 1996, 1997, 1998, 2003, 2004, 2006 Free Software
00002    Foundation, Inc.  This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 #ifndef _BITS_SIGCONTEXT_H
00020 #define _BITS_SIGCONTEXT_H 1
00021 
00022 #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
00023 # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
00024 #endif
00025 
00026 #include <sgidefs.h>
00027 
00028 #if _MIPS_SIM == _ABIO32
00029 
00030 /* Certain unused fields were replaced with new ones in 2.6.12-rc4.
00031    The changes were as follows:
00032 
00033    sc_cause -> sc_hi1
00034    sc_badvaddr -> sc_lo1
00035    sc_sigset[0] -> sc_hi2
00036    sc_sigset[1] -> sc_lo2
00037    sc_sigset[2] -> sc_hi3
00038    sc_sigset[3] -> sc_lo3
00039 
00040    sc_regmask, sc_ownedfp and sc_fpc_eir are not used.  */
00041 struct sigcontext {
00042   unsigned int sc_regmask;
00043   unsigned int sc_status;
00044   unsigned long long sc_pc;
00045   unsigned long long sc_regs[32];
00046   unsigned long long sc_fpregs[32];
00047   unsigned int sc_ownedfp;
00048   unsigned int sc_fpc_csr;
00049   unsigned int sc_fpc_eir;
00050   unsigned int sc_used_math;
00051   unsigned int sc_dsp;
00052   unsigned long long sc_mdhi;
00053   unsigned long long sc_mdlo;
00054   unsigned long sc_hi1;
00055   unsigned long sc_lo1;
00056   unsigned long sc_hi2;
00057   unsigned long sc_lo2;
00058   unsigned long sc_hi3;
00059   unsigned long sc_lo3;
00060 };
00061 
00062 #else
00063 
00064 /* This structure changed in 2.6.12-rc4 when DSP support was added.  */
00065 struct sigcontext {
00066   unsigned long long sc_regs[32];
00067   unsigned long long sc_fpregs[32];
00068   unsigned long long sc_mdhi;
00069   unsigned long long sc_hi1;
00070   unsigned long long sc_hi2;
00071   unsigned long long sc_hi3;
00072   unsigned long long sc_mdlo;
00073   unsigned long long sc_lo1;
00074   unsigned long long sc_lo2;
00075   unsigned long long sc_lo3;
00076   unsigned long long sc_pc;
00077   unsigned int sc_fpc_csr;
00078   unsigned int sc_used_math;
00079   unsigned int sc_dsp;
00080   unsigned int sc_reserved;
00081 };
00082 
00083 #endif /* _MIPS_SIM != _ABIO32 */
00084 #endif