]> git.saurik.com Git - apple/libc.git/blob - libdarwin/internal.h
12e64c79dc8ec6e522e83b7ca20e1227f8537999
[apple/libc.git] / libdarwin / internal.h
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>
45
46 #include <sys/sysctl.h>
47 #include <sys/reboot.h>
48 #include <sys/syscall.h>
49 #include <sys/errno.h>
50 #include <sys/paths.h>
51 #include <sys/spawn.h>
52 #include <sys/proc_info.h>
53 #include <sys/sysctl.h>
54 #include <sys/reboot.h>
55 #include <sys/syscall.h>
56 #include <sys/errno.h>
57 #include <sys/paths.h>
58 #include <sys/spawn.h>
59 #include <sys/proc_info.h>
60
61 #define OS_CRASH_ENABLE_EXPERIMENTAL_LIBTRACE 1
62 #include <os/assumes.h>
63 #include <os/transaction_private.h>
64 #include <os/log_private.h>
65 #include <os/alloc_once_private.h>
66
67 #include <mach-o/getsect.h>
68 #include <bsm/libbsm.h>
69 #include <sysexits.h>
70 #include <spawn.h>
71 #include <libproc.h>
72 #include <string.h>
73 #include <dlfcn.h>
74 #include <err.h>
75 #include <ctype.h>
76 #include <struct.h>
77 #include <bootstrap_priv.h>
78 #include <assert.h>
79
80 #define RDAR_12809455 1
81
82 #include "h/bsd.h"
83 #include "h/cleanup.h"
84 #include "h/err.h"
85 #include "h/errno.h"
86 #include "h/mach_exception.h"
87 #include "h/mach_utils.h"
88 #include "h/stdio.h"
89 #include "h/stdlib.h"
90 #include "h/string.h"
91
92 #if DARWIN_TAPI
93 // Duplicate declarations to make TAPI happy. This header is included in the
94 // TAPI build as an extra public header.
95 API_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0))
96 OS_EXPORT OS_NONNULL1
97 void
98 os_assert_mach(const char *op, kern_return_t kr);
99
100 API_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0))
101 OS_EXPORT
102 void
103 os_assert_mach_port_status(const char *desc, mach_port_t p,
104 mach_port_status_t *expected);
105 #endif
106
107 #endif //__DARWIN_INTERNAL_H