]>
git.saurik.com Git - apple/xnu.git/blob - bsd/ppc/signal.h
2 * Copyright (c) 2000-2004 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 #define _PPC_SIGNAL_ 1
29 #include <sys/appleapiopts.h>
31 #ifdef __APPLE_API_OBSOLETE
32 typedef int sig_atomic_t;
35 * Machine-dependant flags used in sigvec call.
37 #define SV_SAVE_REGS 0x1000 /* Save all regs in sigcontext */
40 * regs_saved_t -- Describes which registers beyond what the kernel cares
41 * about are saved to and restored from this sigcontext.
43 * The default is REGS_SAVED_CALLER, only the caller saved registers
44 * are saved. If the SV_SAVE_REGS flag was set when the signal
45 * handler was registered with sigvec() then all the registers will be
46 * saved in the sigcontext, and REGS_SAVED_ALL will be set. The C
47 * library uses REGS_SAVED_NONE in order to quickly restore kernel
48 * state during a longjmp().
51 REGS_SAVED_NONE
, /* Only kernel managed regs restored */
52 REGS_SAVED_CALLER
, /* "Caller saved" regs: rpc, a0-a7,
53 t0-t4, at, lk0-lk1, xt1-xt20,
55 REGS_SAVED_ALL
/* All registers */
60 * Information pushed on stack when a signal is delivered.
61 * This is used by the kernel to restore state following
62 * execution of the signal handler. It is also made available
63 * to the handler to allow it to properly restore state if
64 * a non-standard exit is performed.
67 int sc_onstack
; /* sigstack state to restore */
68 int sc_mask
; /* signal mask to restore */
70 int sc_psw
; /* processor status word */
71 int sc_sp
; /* stack pointer if sc_regs == NULL */
72 void *sc_regs
; /* (kernel private) saved state */
76 int sc_onstack
; /* sigstack state to restore */
77 int sc_mask
; /* signal mask to restore */
78 long long sc_ir
; /* pc */
79 long long sc_psw
; /* processor status word */
80 long long sc_sp
; /* stack pointer if sc_regs == NULL */
81 void *sc_regs
; /* (kernel private) saved state */
85 * LP64todo - Have to decide how to handle this.
86 * For now, just duplicate the 32-bit context as the generic one.
89 int sc_onstack
; /* sigstack state to restore */
90 int sc_mask
; /* signal mask to restore */
92 int sc_psw
; /* processor status word */
93 int sc_sp
; /* stack pointer if sc_regs == NULL */
94 void *sc_regs
; /* (kernel private) saved state */
97 #endif /* __APPLE_API_OBSOLETE */
99 #endif /* _PPC_SIGNAL_ */