]> git.saurik.com Git - apple/xnu.git/blob - bsd/sys/ux_exception.h
60ae8f7d82c9322a444327fe52d6c51de38b708d
[apple/xnu.git] / bsd / sys / ux_exception.h
1 /*
2 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23 /*
24 * Mach Operating System
25 * Copyright (c) 1989 Carnegie-Mellon University
26 * Copyright (c) 1988 Carnegie-Mellon University
27 * Copyright (c) 1987 Carnegie-Mellon University
28 * All rights reserved. The CMU software License Agreement specifies
29 * the terms and conditions for use and redistribution.
30 */
31
32 /*
33 * Codes for Unix software exceptions under EXC_SOFTWARE.
34 */
35
36 #ifndef _SYS_UX_EXCEPTION_H_
37 #define _SYS_UX_EXCEPTION_H_
38
39 #include <sys/appleapiopts.h>
40
41 #ifdef __APPLE_API_UNSTABLE
42
43 #define EXC_UNIX_BAD_SYSCALL 0x10000 /* SIGSYS */
44
45 #define EXC_UNIX_BAD_PIPE 0x10001 /* SIGPIPE */
46
47 #define EXC_UNIX_ABORT 0x10002 /* SIGABRT */
48
49 #endif /* __APPLE_API_UNSTABLE */
50
51 #ifdef KERNEL
52 #ifdef __APPLE_API_PRIVATE
53 /*
54 * Kernel data structures for Unix exception handler.
55 */
56
57 #include <mach/port.h>
58
59 extern mach_port_name_t ux_exception_port;
60
61 boolean_t machine_exception(int exception, int code, int subcode,
62 int *unix_signal, int *unix_code);
63 void ux_handler_init(void);
64
65 #endif /* __APPLE_API_PRIVATE */
66 #endif /* KERNEL */
67
68 #endif /* _SYS_UX_EXCEPTION_H_ */