Back to index

glibc  2.9
sigcontext.h
Go to the documentation of this file.
00001 /* Machine-dependent signal context structure for GNU Hurd.  PowerPC version.
00002    Copyright (C) 2001,02 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public License as
00007    published by the Free Software Foundation; either version 2.1 of the
00008    License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; see the file COPYING.LIB.  If not,
00017    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA 02111-1307, USA.  */
00019 
00020 #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
00021 # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
00022 #endif
00023 
00024 #ifndef sc_pc
00025 
00026 /* Signal handlers are actually called:
00027    void handler (int sig, int code, struct sigcontext *scp);  */
00028 
00029 /* State of this thread when the signal was taken.  */
00030 struct sigcontext
00031   {
00032     /* These first members are machine-independent.  */
00033 
00034     int sc_onstack;         /* Nonzero if running on sigstack.  */
00035     __sigset_t sc_mask;            /* Blocked signals to restore.  */
00036 
00037     /* MiG reply port this thread is using.  */
00038     unsigned int sc_reply_port;
00039 
00040     /* Port this thread is doing an interruptible RPC on.  */
00041     unsigned int sc_intr_port;
00042 
00043     /* Error code associated with this signal (interpreted as `error_t').  */
00044     int sc_error;
00045 
00046     /* All following members are machine-dependent.  The rest of this
00047        structure is written to be laid out identically to:
00048        {
00049         struct ppc_thread_state basic;
00050         struct ppc_exc_state exc;
00051         struct ppc_float_state fpu;
00052        }
00053        trampoline.c knows this, so it must be changed if this changes.  */
00054 
00055 #define sc_ppc_thread_state sc_srr0 /* Beginning of correspondence.  */
00056 #define sc_pc sc_srr0 /* For sysdeps/generic/profil-counter.h.  */
00057     unsigned int sc_srr0;
00058     unsigned int sc_srr1;
00059     unsigned int sc_gprs[32];
00060     unsigned int sc_cr;
00061     unsigned int sc_xer;
00062     unsigned int sc_lr;
00063     unsigned int sc_ctr;
00064     unsigned int sc_mq;
00065     unsigned int sc_ts_pad;
00066 
00067 #define sc_ppc_exc_state sc_dar
00068     unsigned int sc_dar;
00069     unsigned int sc_dsisr;
00070     unsigned int sc_exception;
00071     unsigned int sc_es_pad0;
00072     unsigned int sc_es_pad1[4];
00073 
00074 #define sc_ppc_float_state sc_fprs[0]
00075     double sc_fprs[32];
00076     unsigned int sc_fpscr_pad;
00077     unsigned int sc_fpscr;
00078   };
00079 
00080 #endif /* sc_pc */