]>
git.saurik.com Git - apple/xnu.git/blob - bsd/ppc/signal.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
23 * Copyright (c) 1992, 1993 NeXT Computer, Inc.
27 * Machine specific signal information.
30 * 25-MAR-97 Umesh Vaishampayan (umeshv@NeXT.com)
31 * Ported from m98k and hppa.
33 * 13-Jan-92 Peter King (king) at NeXT Computer, Inc.
34 * Filled out struct sigcontext to hold all registers.
35 * Added regs_saved_t to specify which regs stored in the
36 * sigcontext are valid.
38 * 09-Nov-92 Ben Fathi (benf) at NeXT, Inc.
41 * 09-May-91 Mike DeMoney (mike) at NeXT, Inc.
46 #define _PPC_SIGNAL_ 1
48 typedef int sig_atomic_t;
51 * Machine-dependant flags used in sigvec call.
53 #define SV_SAVE_REGS 0x1000 /* Save all regs in sigcontext */
56 * regs_saved_t -- Describes which registers beyond what the kernel cares
57 * about are saved to and restored from this sigcontext.
59 * The default is REGS_SAVED_CALLER, only the caller saved registers
60 * are saved. If the SV_SAVE_REGS flag was set when the signal
61 * handler was registered with sigvec() then all the registers will be
62 * saved in the sigcontext, and REGS_SAVED_ALL will be set. The C
63 * library uses REGS_SAVED_NONE in order to quickly restore kernel
64 * state during a longjmp().
67 REGS_SAVED_NONE
, /* Only kernel managed regs restored */
68 REGS_SAVED_CALLER
, /* "Caller saved" regs: rpc, a0-a7,
69 t0-t4, at, lk0-lk1, xt1-xt20,
71 REGS_SAVED_ALL
/* All registers */
76 * Information pushed on stack when a signal is delivered.
77 * This is used by the kernel to restore state following
78 * execution of the signal handler. It is also made available
79 * to the handler to allow it to properly restore state if
80 * a non-standard exit is performed.
83 int sc_onstack
; /* sigstack state to restore */
84 int sc_mask
; /* signal mask to restore */
86 int sc_psw
; /* processor status word */
87 int sc_sp
; /* stack pointer if sc_regs == NULL */
88 void *sc_regs
; /* (kernel private) saved state */
91 #endif /* _PPC_SIGNAL_ */