|
|
1.1 root 1: /*
2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7: * Reserved. This file contains Original Code and/or Modifications of
8: * Original Code as defined in and that are subject to the Apple Public
9: * Source License Version 1.1 (the "License"). You may not use this file
10: * except in compliance with the License. Please obtain a copy of the
11: * License at http://www.apple.com/publicsource and read it before using
12: * this file.
13: *
14: * The Original Code and all software distributed under the License are
15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19: * License for the specific language governing rights and limitations
20: * under the License.
21: *
22: * @APPLE_LICENSE_HEADER_END@
23: */
24:
25: /*
26: * Copyright (c) 1992, 1993 NeXT Computer, Inc.
27: *
28: * HISTORY
29: *
30: * Machine specific signal information.
31: *
32: * HISTORY
33: * 25-MAR-97 Umesh Vaishampayan ([email protected])
34: * Ported from m98k and hppa.
35: *
36: * 13-Jan-92 Peter King (king) at NeXT Computer, Inc.
37: * Filled out struct sigcontext to hold all registers.
38: * Added regs_saved_t to specify which regs stored in the
39: * sigcontext are valid.
40: *
41: * 09-Nov-92 Ben Fathi (benf) at NeXT, Inc.
42: * Ported to m98k.
43: *
44: * 09-May-91 Mike DeMoney (mike) at NeXT, Inc.
45: * Ported to m88k.
46: */
47:
48: #ifndef _PPC_SIGNAL_
49: #define _PPC_SIGNAL_ 1
50:
51: typedef int sig_atomic_t;
52:
53: /*
54: * Machine-dependant flags used in sigvec call.
55: */
56: #define SV_SAVE_REGS 0x1000 /* Save all regs in sigcontext */
57:
58: /*
59: * regs_saved_t -- Describes which registers beyond what the kernel cares
60: * about are saved to and restored from this sigcontext.
61: *
62: * The default is REGS_SAVED_CALLER, only the caller saved registers
63: * are saved. If the SV_SAVE_REGS flag was set when the signal
64: * handler was registered with sigvec() then all the registers will be
65: * saved in the sigcontext, and REGS_SAVED_ALL will be set. The C
66: * library uses REGS_SAVED_NONE in order to quickly restore kernel
67: * state during a longjmp().
68: */
69: typedef enum {
70: REGS_SAVED_NONE, /* Only kernel managed regs restored */
71: REGS_SAVED_CALLER, /* "Caller saved" regs: rpc, a0-a7,
72: t0-t4, at, lk0-lk1, xt1-xt20,
73: xr0-xr1 */
74: REGS_SAVED_ALL /* All registers */
75: } regs_saved_t;
76:
77:
78: /*
79: * Information pushed on stack when a signal is delivered.
80: * This is used by the kernel to restore state following
81: * execution of the signal handler. It is also made available
82: * to the handler to allow it to properly restore state if
83: * a non-standard exit is performed.
84: */
85: struct sigcontext {
86: int sc_onstack; /* sigstack state to restore */
87: int sc_mask; /* signal mask to restore */
88: int sc_ir; /* pc */
89: int sc_psw; /* processor status word */
90: int sc_sp; /* stack pointer if sc_regs == NULL */
91: void *sc_regs; /* (kernel private) saved state */
92: };
93:
94: #endif /* _PPC_SIGNAL_ */
95:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.