]>
Commit | Line | Data |
---|---|---|
70ad1dc8 A |
1 | /* |
2 | * Copyright (c) 2017 Apple 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 | /*! | |
25 | * @header | |
26 | * libdarwin internal header. | |
27 | */ | |
28 | #ifndef __DARWIN_INTERNAL_H | |
29 | #define __DARWIN_INTERNAL_H | |
30 | ||
31 | #include <os/base.h> | |
32 | #include <os/api.h> | |
33 | #include <Availability.h> | |
34 | ||
35 | #include <mach/port.h> | |
36 | #include <mach/message.h> | |
37 | #include <mach/host_priv.h> | |
38 | #include <mach/host_reboot.h> | |
39 | #include <mach/mach_time.h> | |
40 | #include <mach/mach.h> | |
41 | #include <mach/port.h> | |
42 | #include <mach/message.h> | |
43 | #include <mach/host_priv.h> | |
44 | #include <mach/host_reboot.h> | |
507116e3 | 45 | #include <mach/kern_return.h> |
70ad1dc8 A |
46 | |
47 | #include <sys/sysctl.h> | |
48 | #include <sys/reboot.h> | |
49 | #include <sys/syscall.h> | |
50 | #include <sys/errno.h> | |
51 | #include <sys/paths.h> | |
52 | #include <sys/spawn.h> | |
53 | #include <sys/proc_info.h> | |
54 | #include <sys/sysctl.h> | |
55 | #include <sys/reboot.h> | |
56 | #include <sys/syscall.h> | |
57 | #include <sys/errno.h> | |
58 | #include <sys/paths.h> | |
59 | #include <sys/spawn.h> | |
60 | #include <sys/proc_info.h> | |
507116e3 | 61 | #include <crt_externs.h> |
70ad1dc8 A |
62 | |
63 | #define OS_CRASH_ENABLE_EXPERIMENTAL_LIBTRACE 1 | |
64 | #include <os/assumes.h> | |
65 | #include <os/transaction_private.h> | |
66 | #include <os/log_private.h> | |
67 | #include <os/alloc_once_private.h> | |
68 | ||
69 | #include <mach-o/getsect.h> | |
70 | #include <bsm/libbsm.h> | |
71 | #include <sysexits.h> | |
72 | #include <spawn.h> | |
73 | #include <libproc.h> | |
74 | #include <string.h> | |
75 | #include <dlfcn.h> | |
76 | #include <err.h> | |
77 | #include <ctype.h> | |
78 | #include <struct.h> | |
79 | #include <bootstrap_priv.h> | |
80 | #include <assert.h> | |
81 | ||
70ad1dc8 A |
82 | #include "h/bsd.h" |
83 | #include "h/cleanup.h" | |
507116e3 | 84 | #include "h/ctl.h" |
70ad1dc8 A |
85 | #include "h/err.h" |
86 | #include "h/errno.h" | |
87 | #include "h/mach_exception.h" | |
88 | #include "h/mach_utils.h" | |
89 | #include "h/stdio.h" | |
90 | #include "h/stdlib.h" | |
91 | #include "h/string.h" | |
92 | ||
93 | #if DARWIN_TAPI | |
507116e3 A |
94 | #undef os_assert_mach |
95 | #undef os_assert_mach_port_status | |
96 | ||
70ad1dc8 A |
97 | // Duplicate declarations to make TAPI happy. This header is included in the |
98 | // TAPI build as an extra public header. | |
99 | API_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0)) | |
100 | OS_EXPORT OS_NONNULL1 | |
101 | void | |
507116e3 | 102 | (os_assert_mach)(const char *op, kern_return_t kr); |
70ad1dc8 A |
103 | |
104 | API_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0)) | |
105 | OS_EXPORT | |
106 | void | |
107 | os_assert_mach_port_status(const char *desc, mach_port_t p, | |
108 | mach_port_status_t *expected); | |
109 | #endif | |
110 | ||
111 | #endif //__DARWIN_INTERNAL_H |