]>
git.saurik.com Git - apple/xnu.git/blob - bsd/ppc/signal.h
2 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
26 * Copyright (c) 1992, 1993 NeXT Computer, Inc.
30 #define _PPC_SIGNAL_ 1
32 #include <sys/appleapiopts.h>
34 #ifdef __APPLE_API_OBSOLETE
35 typedef int sig_atomic_t;
38 * Machine-dependant flags used in sigvec call.
40 #define SV_SAVE_REGS 0x1000 /* Save all regs in sigcontext */
43 * regs_saved_t -- Describes which registers beyond what the kernel cares
44 * about are saved to and restored from this sigcontext.
46 * The default is REGS_SAVED_CALLER, only the caller saved registers
47 * are saved. If the SV_SAVE_REGS flag was set when the signal
48 * handler was registered with sigvec() then all the registers will be
49 * saved in the sigcontext, and REGS_SAVED_ALL will be set. The C
50 * library uses REGS_SAVED_NONE in order to quickly restore kernel
51 * state during a longjmp().
54 REGS_SAVED_NONE
, /* Only kernel managed regs restored */
55 REGS_SAVED_CALLER
, /* "Caller saved" regs: rpc, a0-a7,
56 t0-t4, at, lk0-lk1, xt1-xt20,
58 REGS_SAVED_ALL
/* All registers */
63 * Information pushed on stack when a signal is delivered.
64 * This is used by the kernel to restore state following
65 * execution of the signal handler. It is also made available
66 * to the handler to allow it to properly restore state if
67 * a non-standard exit is performed.
70 int sc_onstack
; /* sigstack state to restore */
71 int sc_mask
; /* signal mask to restore */
73 int sc_psw
; /* processor status word */
74 int sc_sp
; /* stack pointer if sc_regs == NULL */
75 void *sc_regs
; /* (kernel private) saved state */
78 #endif /* __APPLE_API_OBSOLETE */
80 #endif /* _PPC_SIGNAL_ */