Back to index

glibc  2.9
sigcontext.h
Go to the documentation of this file.
00001 /* Machine-dependent signal context structure for GNU Hurd.  Alpha version.
00002    Copyright (C) 1994,97,2001 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
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the 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; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    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_alpha_thread_state
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     long 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 long int sc_reply_port;
00039 
00040     /* Port this thread is doing an interruptible RPC on.  */
00041     unsigned long 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 alpha_thread_state basic;
00050         struct alpha_exc_state exc;
00051         struct alpha_float_state fpu;
00052        }
00053        trampoline.c knows this, so it must be changed if this changes.  */
00054 
00055 #define sc_alpha_thread_state sc_regs /* Beginning of correspondence.  */
00056     long int sc_regs[31];   /* General registers $0..$30.  */
00057     long int sc_pc;         /* Program counter.  */
00058 
00059     /* struct alpha_exc_state */
00060 #define sc_alpha_exc_state sc_badvaddr
00061     unsigned long int sc_badvaddr;
00062     unsigned int sc_cause;  /* Machine-level trap code.  */
00063 #define SC_CAUSE_SET_SSTEP  1
00064     int sc_used_fpa;        /* Nonzero if FPU was used.  */
00065 
00066     /* struct alpha_float_state
00067        This is only filled in if sc_used_fpa is nonzero.  */
00068 #define sc_alpha_float_state sc_fpregs
00069     double sc_fpregs[31];   /* Floating point registers $f0..$f30.  */
00070     long int sc_fpcsr;             /* Floating point control/status register.  */
00071   };
00072 
00073 #endif /* sc_alpha_thread_state */