authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-11-17 11:32:12-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-11-17 11:40:24-08:00
log2eee0582f8654cb2b344ed8e2c43dcda3424dbe5
tree82292f7be0beb71b927e1b57540b24a956c198f1
parent21a77f7ac35cc3404a1ed3cb03329aef1c980f30

macOS libc headers: downgrade to 10.15.7 (Catalina)

See ziglang/fetch-them-macos-headers#2 for more details. The path forward looks like one of the following: * Ony provide headers for the oldest supported macOS (currently 10.13 but soon to be bumped to 10.14). * Provide headers for multiple versions, and select based on the Zig target OS version range minimum. * Don't try to provide macOS headers. If we don't tackle the version problem, we would have to re-introduce the ability to detect and depend on native system headers if we wanted to support C/C++ code that used newer OS definitions. This patch also adds support for `#include <mach/mach_time.h>`. Also related: #5236

136 files changed, 1168 insertions(+), 2927 deletions(-)

lib/libc/include/x86_64-macos-gnu/Availability.h+124-1
......@@ -132,7 +132,130 @@
132132#define __API_TO_BE_DEPRECATED 100000
133133#endif
134134
135#include <AvailabilityVersions.h>
135#ifndef __MAC_10_0
136#define __MAC_10_0 1000
137#define __MAC_10_1 1010
138#define __MAC_10_2 1020
139#define __MAC_10_3 1030
140#define __MAC_10_4 1040
141#define __MAC_10_5 1050
142#define __MAC_10_6 1060
143#define __MAC_10_7 1070
144#define __MAC_10_8 1080
145#define __MAC_10_9 1090
146#define __MAC_10_10 101000
147#define __MAC_10_10_2 101002
148#define __MAC_10_10_3 101003
149#define __MAC_10_11 101100
150#define __MAC_10_11_2 101102
151#define __MAC_10_11_3 101103
152#define __MAC_10_11_4 101104
153#define __MAC_10_12 101200
154#define __MAC_10_12_1 101201
155#define __MAC_10_12_2 101202
156#define __MAC_10_12_4 101204
157#define __MAC_10_13 101300
158#define __MAC_10_13_1 101301
159#define __MAC_10_13_2 101302
160#define __MAC_10_13_4 101304
161#define __MAC_10_14 101400
162#define __MAC_10_14_1 101401
163#define __MAC_10_14_4 101404
164#define __MAC_10_15 101500
165#define __MAC_10_15_1 101501
166#define __MAC_10_15_4 101504
167/* __MAC_NA is not defined to a value but is uses as a token by macros to indicate that the API is unavailable */
168
169#define __IPHONE_2_0 20000
170#define __IPHONE_2_1 20100
171#define __IPHONE_2_2 20200
172#define __IPHONE_3_0 30000
173#define __IPHONE_3_1 30100
174#define __IPHONE_3_2 30200
175#define __IPHONE_4_0 40000
176#define __IPHONE_4_1 40100
177#define __IPHONE_4_2 40200
178#define __IPHONE_4_3 40300
179#define __IPHONE_5_0 50000
180#define __IPHONE_5_1 50100
181#define __IPHONE_6_0 60000
182#define __IPHONE_6_1 60100
183#define __IPHONE_7_0 70000
184#define __IPHONE_7_1 70100
185#define __IPHONE_8_0 80000
186#define __IPHONE_8_1 80100
187#define __IPHONE_8_2 80200
188#define __IPHONE_8_3 80300
189#define __IPHONE_8_4 80400
190#define __IPHONE_9_0 90000
191#define __IPHONE_9_1 90100
192#define __IPHONE_9_2 90200
193#define __IPHONE_9_3 90300
194#define __IPHONE_10_0 100000
195#define __IPHONE_10_1 100100
196#define __IPHONE_10_2 100200
197#define __IPHONE_10_3 100300
198#define __IPHONE_11_0 110000
199#define __IPHONE_11_1 110100
200#define __IPHONE_11_2 110200
201#define __IPHONE_11_3 110300
202#define __IPHONE_11_4 110400
203#define __IPHONE_12_0 120000
204#define __IPHONE_12_1 120100
205#define __IPHONE_12_2 120200
206#define __IPHONE_12_3 120300
207#define __IPHONE_13_0 130000
208#define __IPHONE_13_1 130100
209#define __IPHONE_13_2 130200
210#define __IPHONE_13_3 130300
211#define __IPHONE_13_4 130400
212#define __IPHONE_13_5 130500
213#define __IPHONE_13_6 130600
214/* __IPHONE_NA is not defined to a value but is uses as a token by macros to indicate that the API is unavailable */
215
216#define __TVOS_9_0 90000
217#define __TVOS_9_1 90100
218#define __TVOS_9_2 90200
219#define __TVOS_10_0 100000
220#define __TVOS_10_0_1 100001
221#define __TVOS_10_1 100100
222#define __TVOS_10_2 100200
223#define __TVOS_11_0 110000
224#define __TVOS_11_1 110100
225#define __TVOS_11_2 110200
226#define __TVOS_11_3 110300
227#define __TVOS_11_4 110400
228#define __TVOS_12_0 120000
229#define __TVOS_12_1 120100
230#define __TVOS_12_2 120200
231#define __TVOS_12_3 120300
232#define __TVOS_13_0 130000
233#define __TVOS_13_2 130200
234#define __TVOS_13_3 130300
235#define __TVOS_13_4 130400
236
237#define __WATCHOS_1_0 10000
238#define __WATCHOS_2_0 20000
239#define __WATCHOS_2_1 20100
240#define __WATCHOS_2_2 20200
241#define __WATCHOS_3_0 30000
242#define __WATCHOS_3_1 30100
243#define __WATCHOS_3_1_1 30101
244#define __WATCHOS_3_2 30200
245#define __WATCHOS_4_0 40000
246#define __WATCHOS_4_1 40100
247#define __WATCHOS_4_2 40200
248#define __WATCHOS_4_3 40300
249#define __WATCHOS_5_0 50000
250#define __WATCHOS_5_1 50100
251#define __WATCHOS_5_2 50200
252#define __WATCHOS_6_0 60000
253#define __WATCHOS_6_1 60100
254#define __WATCHOS_6_2 60200
255
256#define __DRIVERKIT_19_0 190000
257#endif /* __MAC_10_0 */
258
136259#include <AvailabilityInternal.h>
137260
138261#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED
lib/libc/include/x86_64-macos-gnu/AvailabilityInternal.h+6-9
......@@ -45,9 +45,6 @@
4545 #ifdef __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
4646 /* compiler sets __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ when -miphoneos-version-min is used */
4747 #define __IPHONE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
48 /* set to 1 when RC_FALLBACK_PLATFORM=iphoneos */
49 #elif 0
50 #define __IPHONE_OS_VERSION_MIN_REQUIRED __IPHONE_14_0
5148 #endif
5249#endif /* __IPHONE_OS_VERSION_MIN_REQUIRED */
5350
......@@ -55,7 +52,7 @@
5552 #ifdef __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
5653 /* compiler sets __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ when -mtvos-version-min is used */
5754 #define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
58 #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_14_2
55 #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_13_0
5956 /* for compatibility with existing code. New code should use platform specific checks */
6057 #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000
6158 #endif
......@@ -65,7 +62,7 @@
6562 #ifdef __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
6663 /* compiler sets __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ when -mwatchos-version-min is used */
6764 #define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
68 #define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_7_1
65 #define __WATCH_OS_VERSION_MAX_ALLOWED 60000
6966 /* for compatibility with existing code. New code should use platform specific checks */
7067 #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000
7168 #endif
......@@ -75,7 +72,7 @@
7572 #ifdef __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__
7673
7774 #define __BRIDGE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__
78 #define __BRIDGE_OS_VERSION_MAX_ALLOWED 50000
75 #define __BRIDGE_OS_VERSION_MAX_ALLOWED 20000
7976 /* for compatibility with existing code. New code should use platform specific checks */
8077 #define __IPHONE_OS_VERSION_MIN_REQUIRED 110000
8178 #endif
......@@ -90,14 +87,14 @@
9087#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
9188 /* make sure a default max version is set */
9289 #ifndef __MAC_OS_X_VERSION_MAX_ALLOWED
93 #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_11_0
90 #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_10_15
9491 #endif
9592#endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
9693
9794#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED
9895 /* make sure a default max version is set */
9996 #ifndef __IPHONE_OS_VERSION_MAX_ALLOWED
100 #define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_14_2
97 #define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_13_0
10198 #endif
10299 /* make sure a valid min is set */
103100 #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_2_0
......@@ -2890,7 +2887,7 @@
28902887 #if __has_builtin(__is_target_environment)
28912888 #if __has_builtin(__is_target_variant_os)
28922889 #if __has_builtin(__is_target_variant_environment)
2893 #if ((__is_target_arch(x86_64) || __is_target_arch(arm64) || __is_target_arch(arm64e)) && __is_target_vendor(apple) && __is_target_os(ios) && __is_target_environment(macabi))
2890 #if (__is_target_arch(x86_64) && __is_target_vendor(apple) && __is_target_os(ios) && __is_target_environment(macabi))
28942891 #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION __attribute__((availability(ios,introduced=4.0)))
28952892 #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION_DEP__IPHONE_COMPAT_VERSION __attribute__((availability(ios,unavailable)))
28962893 #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION_DEP__IPHONE_COMPAT_VERSION_MSG(_msg) __attribute__((availability(ios,unavailable)))
lib/libc/include/x86_64-macos-gnu/AvailabilityMacros.h+4-4
......@@ -117,9 +117,9 @@
117117#define MAC_OS_X_VERSION_10_14_1 101401
118118#define MAC_OS_X_VERSION_10_14_4 101404
119119#define MAC_OS_X_VERSION_10_15 101500
120#define MAC_OS_VERSION_11_0 110000
120#define MAC_OS_X_VERSION_10_15_1 101501
121121
122/*
122/*
123123 * If min OS not specified, assume 10.4 for intel
124124 * Note: compiler driver may set _ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED_ based on MACOSX_DEPLOYMENT_TARGET environment variable
125125 */
......@@ -144,10 +144,10 @@
144144 * if max OS not specified, assume larger of (10.15, min)
145145 */
146146#ifndef MAC_OS_X_VERSION_MAX_ALLOWED
147 #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_VERSION_11_0
147 #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_15
148148 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_MIN_REQUIRED
149149 #else
150 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_VERSION_11_0
150 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_15
151151 #endif
152152#endif
153153
lib/libc/include/x86_64-macos-gnu/AvailabilityVersions.h deleted-208
......@@ -1,208 +0,0 @@
1/*
2 * Copyright (c) 2019 by 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#ifndef __AVAILABILITY_VERSIONS__
25#define __AVAILABILITY_VERSIONS__
26
27#define __MAC_10_0 1000
28#define __MAC_10_1 1010
29#define __MAC_10_2 1020
30#define __MAC_10_3 1030
31#define __MAC_10_4 1040
32#define __MAC_10_5 1050
33#define __MAC_10_6 1060
34#define __MAC_10_7 1070
35#define __MAC_10_8 1080
36#define __MAC_10_9 1090
37#define __MAC_10_10 101000
38#define __MAC_10_10_2 101002
39#define __MAC_10_10_3 101003
40#define __MAC_10_11 101100
41#define __MAC_10_11_2 101102
42#define __MAC_10_11_3 101103
43#define __MAC_10_11_4 101104
44#define __MAC_10_12 101200
45#define __MAC_10_12_1 101201
46#define __MAC_10_12_2 101202
47#define __MAC_10_12_4 101204
48#define __MAC_10_13 101300
49#define __MAC_10_13_1 101301
50#define __MAC_10_13_2 101302
51#define __MAC_10_13_4 101304
52#define __MAC_10_14 101400
53#define __MAC_10_14_1 101401
54#define __MAC_10_14_4 101404
55#define __MAC_10_14_6 101406
56#define __MAC_10_15 101500
57#define __MAC_10_15_1 101501
58#define __MAC_10_15_4 101504
59#define __MAC_10_16 101600
60#define __MAC_11_0 110000
61/* __MAC_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */
62
63#define __IPHONE_2_0 20000
64#define __IPHONE_2_1 20100
65#define __IPHONE_2_2 20200
66#define __IPHONE_3_0 30000
67#define __IPHONE_3_1 30100
68#define __IPHONE_3_2 30200
69#define __IPHONE_4_0 40000
70#define __IPHONE_4_1 40100
71#define __IPHONE_4_2 40200
72#define __IPHONE_4_3 40300
73#define __IPHONE_5_0 50000
74#define __IPHONE_5_1 50100
75#define __IPHONE_6_0 60000
76#define __IPHONE_6_1 60100
77#define __IPHONE_7_0 70000
78#define __IPHONE_7_1 70100
79#define __IPHONE_8_0 80000
80#define __IPHONE_8_1 80100
81#define __IPHONE_8_2 80200
82#define __IPHONE_8_3 80300
83#define __IPHONE_8_4 80400
84#define __IPHONE_9_0 90000
85#define __IPHONE_9_1 90100
86#define __IPHONE_9_2 90200
87#define __IPHONE_9_3 90300
88#define __IPHONE_10_0 100000
89#define __IPHONE_10_1 100100
90#define __IPHONE_10_2 100200
91#define __IPHONE_10_3 100300
92#define __IPHONE_11_0 110000
93#define __IPHONE_11_1 110100
94#define __IPHONE_11_2 110200
95#define __IPHONE_11_3 110300
96#define __IPHONE_11_4 110400
97#define __IPHONE_12_0 120000
98#define __IPHONE_12_1 120100
99#define __IPHONE_12_2 120200
100#define __IPHONE_12_3 120300
101#define __IPHONE_12_4 120400
102#define __IPHONE_13_0 130000
103#define __IPHONE_13_1 130100
104#define __IPHONE_13_2 130200
105#define __IPHONE_13_3 130300
106#define __IPHONE_13_4 130400
107#define __IPHONE_13_5 130500
108#define __IPHONE_13_6 130600
109#define __IPHONE_13_7 130700
110#define __IPHONE_14_0 140000
111#define __IPHONE_14_1 140100
112#define __IPHONE_14_2 140200
113/* __IPHONE_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */
114
115#define __TVOS_9_0 90000
116#define __TVOS_9_1 90100
117#define __TVOS_9_2 90200
118#define __TVOS_10_0 100000
119#define __TVOS_10_0_1 100001
120#define __TVOS_10_1 100100
121#define __TVOS_10_2 100200
122#define __TVOS_11_0 110000
123#define __TVOS_11_1 110100
124#define __TVOS_11_2 110200
125#define __TVOS_11_3 110300
126#define __TVOS_11_4 110400
127#define __TVOS_12_0 120000
128#define __TVOS_12_1 120100
129#define __TVOS_12_2 120200
130#define __TVOS_12_3 120300
131#define __TVOS_12_4 120400
132#define __TVOS_13_0 130000
133#define __TVOS_13_2 130200
134#define __TVOS_13_3 130300
135#define __TVOS_13_4 130400
136#define __TVOS_14_0 140000
137#define __TVOS_14_1 140100
138#define __TVOS_14_2 140200
139
140#define __WATCHOS_1_0 10000
141#define __WATCHOS_2_0 20000
142#define __WATCHOS_2_1 20100
143#define __WATCHOS_2_2 20200
144#define __WATCHOS_3_0 30000
145#define __WATCHOS_3_1 30100
146#define __WATCHOS_3_1_1 30101
147#define __WATCHOS_3_2 30200
148#define __WATCHOS_4_0 40000
149#define __WATCHOS_4_1 40100
150#define __WATCHOS_4_2 40200
151#define __WATCHOS_4_3 40300
152#define __WATCHOS_5_0 50000
153#define __WATCHOS_5_1 50100
154#define __WATCHOS_5_2 50200
155#define __WATCHOS_5_3 50300
156#define __WATCHOS_6_0 60000
157#define __WATCHOS_6_1 60100
158#define __WATCHOS_6_2 60200
159#define __WATCHOS_7_0 70000
160#define __WATCHOS_7_1 70100
161
162/*
163 * Set up standard Mac OS X versions
164 */
165
166#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE)
167
168#define MAC_OS_X_VERSION_10_0 1000
169#define MAC_OS_X_VERSION_10_1 1010
170#define MAC_OS_X_VERSION_10_2 1020
171#define MAC_OS_X_VERSION_10_3 1030
172#define MAC_OS_X_VERSION_10_4 1040
173#define MAC_OS_X_VERSION_10_5 1050
174#define MAC_OS_X_VERSION_10_6 1060
175#define MAC_OS_X_VERSION_10_7 1070
176#define MAC_OS_X_VERSION_10_8 1080
177#define MAC_OS_X_VERSION_10_9 1090
178#define MAC_OS_X_VERSION_10_10 101000
179#define MAC_OS_X_VERSION_10_10_2 101002
180#define MAC_OS_X_VERSION_10_10_3 101003
181#define MAC_OS_X_VERSION_10_11 101100
182#define MAC_OS_X_VERSION_10_11_2 101102
183#define MAC_OS_X_VERSION_10_11_3 101103
184#define MAC_OS_X_VERSION_10_11_4 101104
185#define MAC_OS_X_VERSION_10_12 101200
186#define MAC_OS_X_VERSION_10_12_1 101201
187#define MAC_OS_X_VERSION_10_12_2 101202
188#define MAC_OS_X_VERSION_10_12_4 101204
189#define MAC_OS_X_VERSION_10_13 101300
190#define MAC_OS_X_VERSION_10_13_1 101301
191#define MAC_OS_X_VERSION_10_13_2 101302
192#define MAC_OS_X_VERSION_10_13_4 101304
193#define MAC_OS_X_VERSION_10_14 101400
194#define MAC_OS_X_VERSION_10_14_1 101401
195#define MAC_OS_X_VERSION_10_14_4 101404
196#define MAC_OS_X_VERSION_10_14_6 101406
197#define MAC_OS_X_VERSION_10_15 101500
198#define MAC_OS_X_VERSION_10_15_1 101501
199#define MAC_OS_X_VERSION_10_16 101600
200#define MAC_OS_VERSION_11_0 110000
201
202#endif /* #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) */
203
204#define __DRIVERKIT_19_0 190000
205#define __DRIVERKIT_20_0 200000
206
207#endif /* __AVAILABILITY_VERSIONS__ */
208
lib/libc/include/x86_64-macos-gnu/TargetConditionals.h+68-74
......@@ -35,72 +35,71 @@
3535#ifndef __TARGETCONDITIONALS__
3636#define __TARGETCONDITIONALS__
3737
38/*
39 *
40 * TARGET_CPU_*
41 * These conditionals specify which microprocessor instruction set is being
42 * generated. At most one of these is true, the rest are false.
43 *
44 * TARGET_CPU_PPC - Compiler is generating PowerPC instructions for 32-bit mode
45 * TARGET_CPU_PPC64 - Compiler is generating PowerPC instructions for 64-bit mode
46 * TARGET_CPU_68K - Compiler is generating 680x0 instructions
47 * TARGET_CPU_X86 - Compiler is generating x86 instructions for 32-bit mode
48 * TARGET_CPU_X86_64 - Compiler is generating x86 instructions for 64-bit mode
49 * TARGET_CPU_ARM - Compiler is generating ARM instructions for 32-bit mode
50 * TARGET_CPU_ARM64 - Compiler is generating ARM instructions for 64-bit mode
51 * TARGET_CPU_MIPS - Compiler is generating MIPS instructions
52 * TARGET_CPU_SPARC - Compiler is generating Sparc instructions
53 * TARGET_CPU_ALPHA - Compiler is generating Dec Alpha instructions
54 *
55 *
56 * TARGET_OS_*
57 * These conditionals specify in which Operating System the generated code will
58 * run. Indention is used to show which conditionals are evolutionary subclasses.
59 *
60 * The MAC/WIN32/UNIX conditionals are mutually exclusive.
61 * The IOS/TV/WATCH conditionals are mutually exclusive.
62 *
63 *
64 * TARGET_OS_WIN32 - Generated code will run under 32-bit Windows
65 * TARGET_OS_UNIX - Generated code will run under some Unix (not OSX)
66 * TARGET_OS_MAC - Generated code will run under Mac OS X variant
67 * TARGET_OS_OSX - Generated code will run under OS X devices
68 * TARGET_OS_IPHONE - Generated code for firmware, devices, or simulator
69 * TARGET_OS_IOS - Generated code will run under iOS
70 * TARGET_OS_TV - Generated code will run under Apple TV OS
71 * TARGET_OS_WATCH - Generated code will run under Apple Watch OS
72 * TARGET_OS_BRIDGE - Generated code will run under Bridge devices
73 * TARGET_OS_MACCATALYST - Generated code will run under macOS
74 * TARGET_OS_SIMULATOR - Generated code will run under a simulator
75 *
76 * TARGET_OS_EMBEDDED - DEPRECATED: Use TARGET_OS_IPHONE and/or TARGET_OS_SIMULATOR instead
77 * TARGET_IPHONE_SIMULATOR - DEPRECATED: Same as TARGET_OS_SIMULATOR
78 * TARGET_OS_NANO - DEPRECATED: Same as TARGET_OS_WATCH
79 *
80 * +---------------------------------------------------------------------+
81 * | TARGET_OS_MAC |
82 * | +---+ +-----------------------------------------------+ +---------+ |
83 * | | | | TARGET_OS_IPHONE | | | |
84 * | | | | +---------------+ +----+ +-------+ +--------+ | | | |
85 * | | | | | IOS | | | | | | | | | | |
86 * | |OSX| | |+-------------+| | TV | | WATCH | | BRIDGE | | |DRIVERKIT| |
87 * | | | | || MACCATALYST || | | | | | | | | | |
88 * | | | | |+-------------+| | | | | | | | | | |
89 * | | | | +---------------+ +----+ +-------+ +--------+ | | | |
90 * | +---+ +-----------------------------------------------+ +---------+ |
91 * +---------------------------------------------------------------------+
92 *
93 * TARGET_RT_*
94 * These conditionals specify in which runtime the generated code will
95 * run. This is needed when the OS and CPU support more than one runtime
96 * (e.g. Mac OS X supports CFM and mach-o).
97 *
98 * TARGET_RT_LITTLE_ENDIAN - Generated code uses little endian format for integers
99 * TARGET_RT_BIG_ENDIAN - Generated code uses big endian format for integers
100 * TARGET_RT_64_BIT - Generated code uses 64-bit pointers
101 * TARGET_RT_MAC_CFM - TARGET_OS_MAC is true and CFM68K or PowerPC CFM (TVectors) are used
102 * TARGET_RT_MAC_MACHO - TARGET_OS_MAC is true and Mach-O/dlyd runtime is used
103 */
38/****************************************************************************************************
39
40 TARGET_CPU_*
41 These conditionals specify which microprocessor instruction set is being
42 generated. At most one of these is true, the rest are false.
43
44 TARGET_CPU_PPC - Compiler is generating PowerPC instructions for 32-bit mode
45 TARGET_CPU_PPC64 - Compiler is generating PowerPC instructions for 64-bit mode
46 TARGET_CPU_68K - Compiler is generating 680x0 instructions
47 TARGET_CPU_X86 - Compiler is generating x86 instructions for 32-bit mode
48 TARGET_CPU_X86_64 - Compiler is generating x86 instructions for 64-bit mode
49 TARGET_CPU_ARM - Compiler is generating ARM instructions for 32-bit mode
50 TARGET_CPU_ARM64 - Compiler is generating ARM instructions for 64-bit mode
51 TARGET_CPU_MIPS - Compiler is generating MIPS instructions
52 TARGET_CPU_SPARC - Compiler is generating Sparc instructions
53 TARGET_CPU_ALPHA - Compiler is generating Dec Alpha instructions
54
55
56 TARGET_OS_*
57 These conditionals specify in which Operating System the generated code will
58 run. Indention is used to show which conditionals are evolutionary subclasses.
59
60 The MAC/WIN32/UNIX conditionals are mutually exclusive.
61 The IOS/TV/WATCH conditionals are mutually exclusive.
62
63
64 TARGET_OS_WIN32 - Generated code will run under 32-bit Windows
65 TARGET_OS_UNIX - Generated code will run under some Unix (not OSX)
66 TARGET_OS_MAC - Generated code will run under Mac OS X variant
67 TARGET_OS_OSX - Generated code will run under OS X devices
68 TARGET_OS_IPHONE - Generated code for firmware, devices, or simulator
69 TARGET_OS_IOS - Generated code will run under iOS
70 TARGET_OS_TV - Generated code will run under Apple TV OS
71 TARGET_OS_WATCH - Generated code will run under Apple Watch OS
72 TARGET_OS_BRIDGE - Generated code will run under Bridge devices
73 TARGET_OS_MACCATALYST - Generated code will run under macOS
74 TARGET_OS_SIMULATOR - Generated code will run under a simulator
75
76 TARGET_OS_EMBEDDED - DEPRECATED: Use TARGET_OS_IPHONE and/or TARGET_OS_SIMULATOR instead
77 TARGET_IPHONE_SIMULATOR - DEPRECATED: Same as TARGET_OS_SIMULATOR
78 TARGET_OS_NANO - DEPRECATED: Same as TARGET_OS_WATCH
79
80 +----------------------------------------------------------------+
81 | TARGET_OS_MAC |
82 | +---+ +-----------------------------------------------------+ |
83 | | | | TARGET_OS_IPHONE | |
84 | |OSX| | +-----+ +----+ +-------+ +--------+ +-------------+ | |
85 | | | | | IOS | | TV | | WATCH | | BRIDGE | | MACCATALYST | | |
86 | | | | +-----+ +----+ +-------+ +--------+ +-------------+ | |
87 | +---+ +-----------------------------------------------------+ |
88 +----------------------------------------------------------------+
89
90 TARGET_RT_*
91 These conditionals specify in which runtime the generated code will
92 run. This is needed when the OS and CPU support more than one runtime
93 (e.g. Mac OS X supports CFM and mach-o).
94
95 TARGET_RT_LITTLE_ENDIAN - Generated code uses little endian format for integers
96 TARGET_RT_BIG_ENDIAN - Generated code uses big endian format for integers
97 TARGET_RT_64_BIT - Generated code uses 64-bit pointers
98 TARGET_RT_MAC_CFM - TARGET_OS_MAC is true and CFM68K or PowerPC CFM (TVectors) are used
99 TARGET_RT_MAC_MACHO - TARGET_OS_MAC is true and Mach-O/dlyd runtime is used
100
101
102****************************************************************************************************/
104103
105104 /*
106105 * TARGET_OS conditionals can be enabled via clang preprocessor extensions:
......@@ -134,9 +133,7 @@
134133 #if __has_builtin(__is_target_environment)
135134
136135 /* “-target=x86_64-apple-ios12-macabi” */
137 /* “-target=arm64-apple-ios12-macabi” */
138 /* “-target=arm64e-apple-ios12-macabi” */
139 #if (__is_target_arch(x86_64) || __is_target_arch(arm64) || __is_target_arch(arm64e)) && __is_target_vendor(apple) && __is_target_os(ios) && __is_target_environment(macabi)
136 #if __is_target_arch(x86_64) && __is_target_vendor(apple) && __is_target_os(ios) && __is_target_environment(macabi)
140137 #define TARGET_OS_OSX 0
141138 #define TARGET_OS_IPHONE 1
142139 #define TARGET_OS_IOS 1
......@@ -176,9 +173,7 @@
176173 #endif
177174
178175 /* -target=x86_64-apple-driverkit19.0 */
179 /* -target=arm64-apple-driverkit19.0 */
180 /* -target=arm64e-apple-driverkit19.0 */
181 #if (__is_target_arch(x86_64) || __is_target_arch(arm64) || __is_target_arch(arm64e)) && __is_target_vendor(apple) && __is_target_os(driverkit)
176 #if __is_target_arch(x86_64) && __is_target_vendor(apple) && __is_target_os(driverkit)
182177 #define TARGET_OS_OSX 0
183178 #define TARGET_OS_IPHONE 0
184179 #define TARGET_OS_IOS 0
......@@ -236,8 +231,7 @@
236231
237232 #define TARGET_IPHONE_SIMULATOR TARGET_OS_SIMULATOR /* deprecated */
238233 #define TARGET_OS_NANO TARGET_OS_WATCH /* deprecated */
239
240 #define TARGET_ABI_USES_IOS_VALUES (!TARGET_CPU_X86_64 || (TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST))
234 #define TARGET_ABI_USES_IOS_VALUES (TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST)
241235 #if defined(__ppc__)
242236 #define TARGET_CPU_PPC 1
243237 #define TARGET_CPU_PPC64 0
lib/libc/include/x86_64-macos-gnu/_ctermid.h+1-9
......@@ -1,5 +1,5 @@
11/*
2 * Copyright (c) 2000, 2002-2006, 2008-2010, 2012, 2020 Apple Inc. All rights reserved.
2 * Copyright (c) 2000, 2002-2006, 2008-2010, 2012 Apple Inc. All rights reserved.
33 *
44 * @APPLE_LICENSE_HEADER_START@
55 *
......@@ -23,13 +23,5 @@
2323
2424#ifndef _CTERMID_H_
2525#define _CTERMID_H_
26
27#include <sys/cdefs.h>
28
29__BEGIN_DECLS
30
3126char *ctermid(char *);
32
33__END_DECLS
34
3527#endif
lib/libc/include/x86_64-macos-gnu/bsm/audit.h+5-18
......@@ -332,24 +332,13 @@ struct au_evclass_map {
332332};
333333typedef struct au_evclass_map au_evclass_map_t;
334334
335
336#if !defined(_KERNEL) && !defined(KERNEL)
337#include <Availability.h>
338#define __AUDIT_API_DEPRECATED __API_DEPRECATED("audit is deprecated", macos(10.4, 11.0))
339#else
340#define __AUDIT_API_DEPRECATED
341#endif
342
343335/*
344336 * Audit system calls.
345337 */
346338#if !defined(_KERNEL) && !defined(KERNEL)
347int audit(const void *, int)
348__AUDIT_API_DEPRECATED;
349int auditon(int, void *, int)
350__AUDIT_API_DEPRECATED;
351int auditctl(const char *)
352__AUDIT_API_DEPRECATED;
339int audit(const void *, int);
340int auditon(int, void *, int);
341int auditctl(const char *);
353342int getauid(au_id_t *);
354343int setauid(const au_id_t *);
355344int getaudit_addr(struct auditinfo_addr *, int);
......@@ -371,10 +360,8 @@ __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8,
371360 __IPHONE_2_0, __IPHONE_6_0);
372361#else
373362
374int getaudit(struct auditinfo *)
375__AUDIT_API_DEPRECATED;
376int setaudit(const struct auditinfo *)
377__AUDIT_API_DEPRECATED;
363int getaudit(struct auditinfo *);
364int setaudit(const struct auditinfo *);
378365#endif /* !__APPLE__ */
379366
380367#ifdef __APPLE_API_PRIVATE
lib/libc/include/x86_64-macos-gnu/dispatch/block.h+2-2
......@@ -323,7 +323,7 @@ dispatch_block_perform(dispatch_block_flags_t flags,
323323 */
324324API_AVAILABLE(macos(10.10), ios(8.0))
325325DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NOTHROW
326intptr_t
326long
327327dispatch_block_wait(dispatch_block_t block, dispatch_time_t timeout);
328328
329329/*!
......@@ -416,7 +416,7 @@ dispatch_block_cancel(dispatch_block_t block);
416416API_AVAILABLE(macos(10.10), ios(8.0))
417417DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_WARN_RESULT DISPATCH_PURE
418418DISPATCH_NOTHROW
419intptr_t
419long
420420dispatch_block_testcancel(dispatch_block_t block);
421421
422422__END_DECLS
lib/libc/include/x86_64-macos-gnu/dispatch/dispatch.h-5
......@@ -37,14 +37,10 @@
3737#include <stdint.h>
3838#include <stdbool.h>
3939#include <stdarg.h>
40#include <string.h>
4140#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
4241#include <unistd.h>
4342#endif
4443#include <fcntl.h>
45#if defined(_WIN32)
46#include <time.h>
47#endif
4844
4945#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__has_feature)
5046#if __has_feature(modules)
......@@ -61,7 +57,6 @@
6157#endif
6258
6359#include <os/object.h>
64#include <os/workgroup.h>
6560#include <dispatch/base.h>
6661#include <dispatch/time.h>
6762#include <dispatch/object.h>
lib/libc/include/x86_64-macos-gnu/dispatch/group.h+1-1
......@@ -160,7 +160,7 @@ dispatch_group_async_f(dispatch_group_t group,
160160 */
161161API_AVAILABLE(macos(10.6), ios(4.0))
162162DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW
163intptr_t
163long
164164dispatch_group_wait(dispatch_group_t group, dispatch_time_t timeout);
165165
166166/*!
lib/libc/include/x86_64-macos-gnu/dispatch/object.h+2-2
......@@ -456,7 +456,7 @@ dispatch_set_qos_class_floor(dispatch_object_t object,
456456 */
457457DISPATCH_UNAVAILABLE
458458DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NOTHROW
459intptr_t
459long
460460dispatch_wait(void *object, dispatch_time_t timeout);
461461#if __has_extension(c_generic_selections)
462462#define dispatch_wait(object, timeout) \
......@@ -554,7 +554,7 @@ dispatch_cancel(void *object);
554554DISPATCH_UNAVAILABLE
555555DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_WARN_RESULT DISPATCH_PURE
556556DISPATCH_NOTHROW
557intptr_t
557long
558558dispatch_testcancel(void *object);
559559#if __has_extension(c_generic_selections)
560560#define dispatch_testcancel(object) \
lib/libc/include/x86_64-macos-gnu/dispatch/queue.h+1-1
......@@ -661,7 +661,7 @@ typedef long dispatch_queue_priority_t;
661661API_AVAILABLE(macos(10.6), ios(4.0))
662662DISPATCH_EXPORT DISPATCH_CONST DISPATCH_WARN_RESULT DISPATCH_NOTHROW
663663dispatch_queue_global_t
664dispatch_get_global_queue(intptr_t identifier, uintptr_t flags);
664dispatch_get_global_queue(long identifier, unsigned long flags);
665665
666666/*!
667667 * @typedef dispatch_queue_attr_t
lib/libc/include/x86_64-macos-gnu/dispatch/semaphore.h+3-3
......@@ -61,7 +61,7 @@ API_AVAILABLE(macos(10.6), ios(4.0))
6161DISPATCH_EXPORT DISPATCH_MALLOC DISPATCH_RETURNS_RETAINED DISPATCH_WARN_RESULT
6262DISPATCH_NOTHROW
6363dispatch_semaphore_t
64dispatch_semaphore_create(intptr_t value);
64dispatch_semaphore_create(long value);
6565
6666/*!
6767 * @function dispatch_semaphore_wait
......@@ -85,7 +85,7 @@ dispatch_semaphore_create(intptr_t value);
8585 */
8686API_AVAILABLE(macos(10.6), ios(4.0))
8787DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW
88intptr_t
88long
8989dispatch_semaphore_wait(dispatch_semaphore_t dsema, dispatch_time_t timeout);
9090
9191/*!
......@@ -107,7 +107,7 @@ dispatch_semaphore_wait(dispatch_semaphore_t dsema, dispatch_time_t timeout);
107107 */
108108API_AVAILABLE(macos(10.6), ios(4.0))
109109DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW
110intptr_t
110long
111111dispatch_semaphore_signal(dispatch_semaphore_t dsema);
112112
113113__END_DECLS
lib/libc/include/x86_64-macos-gnu/dispatch/source.h+5-5
......@@ -389,7 +389,7 @@ DISPATCH_NOTHROW
389389dispatch_source_t
390390dispatch_source_create(dispatch_source_type_t type,
391391 uintptr_t handle,
392 uintptr_t mask,
392 unsigned long mask,
393393 dispatch_queue_t _Nullable queue);
394394
395395/*!
......@@ -537,7 +537,7 @@ dispatch_source_cancel(dispatch_source_t source);
537537API_AVAILABLE(macos(10.6), ios(4.0))
538538DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_WARN_RESULT DISPATCH_PURE
539539DISPATCH_NOTHROW
540intptr_t
540long
541541dispatch_source_testcancel(dispatch_source_t source);
542542
543543/*!
......@@ -601,7 +601,7 @@ dispatch_source_get_handle(dispatch_source_t source);
601601API_AVAILABLE(macos(10.6), ios(4.0))
602602DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_WARN_RESULT DISPATCH_PURE
603603DISPATCH_NOTHROW
604uintptr_t
604unsigned long
605605dispatch_source_get_mask(dispatch_source_t source);
606606
607607/*!
......@@ -640,7 +640,7 @@ dispatch_source_get_mask(dispatch_source_t source);
640640API_AVAILABLE(macos(10.6), ios(4.0))
641641DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_WARN_RESULT DISPATCH_PURE
642642DISPATCH_NOTHROW
643uintptr_t
643unsigned long
644644dispatch_source_get_data(dispatch_source_t source);
645645
646646/*!
......@@ -662,7 +662,7 @@ dispatch_source_get_data(dispatch_source_t source);
662662API_AVAILABLE(macos(10.6), ios(4.0))
663663DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW
664664void
665dispatch_source_merge_data(dispatch_source_t source, uintptr_t value);
665dispatch_source_merge_data(dispatch_source_t source, unsigned long value);
666666
667667/*!
668668 * @function dispatch_source_set_timer
lib/libc/include/x86_64-macos-gnu/dispatch/workloop.h-27
......@@ -129,33 +129,6 @@ void
129129dispatch_workloop_set_autorelease_frequency(dispatch_workloop_t workloop,
130130 dispatch_autorelease_frequency_t frequency);
131131
132/*!
133 * @function dispatch_workloop_set_os_workgroup
134 *
135 * @abstract
136 * Associates an os_workgroup_t with the specified dispatch workloop.
137 *
138 * The worker thread will be a member of the specified os_workgroup_t while executing
139 * work items submitted to the workloop.
140 *
141 * @param workloop
142 * The dispatch workloop to modify.
143 *
144 * This workloop must be inactive, passing an activated object is undefined
145 * and will cause the process to be terminated.
146 *
147 * @param workgroup
148 * The workgroup to associate with this workloop.
149 *
150 * The workgroup specified is retained and the previously associated workgroup
151 * (if any) is released.
152 */
153API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
154DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW
155void
156dispatch_workloop_set_os_workgroup(dispatch_workloop_t workloop,
157 os_workgroup_t workgroup);
158
159132__END_DECLS
160133
161134DISPATCH_ASSUME_NONNULL_END
lib/libc/include/x86_64-macos-gnu/i386/_param.h+2-2
......@@ -37,10 +37,10 @@
3737 * cast to any desired pointer type.
3838 */
3939#define __DARWIN_ALIGNBYTES (sizeof(__darwin_size_t) - 1)
40#define __DARWIN_ALIGN(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES) &~ __DARWIN_ALIGNBYTES)
40#define __DARWIN_ALIGN(p) ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES) &~ __DARWIN_ALIGNBYTES)
4141
4242#define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1)
43#define __DARWIN_ALIGN32(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32)
43#define __DARWIN_ALIGN32(p) ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32)
4444
4545
4646#endif /* _I386__PARAM_H_ */
lib/libc/include/x86_64-macos-gnu/libDER/DERItem.h deleted-47
......@@ -1,47 +0,0 @@
1/*
2 * Copyright (c) 2020 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#ifndef _DER_ITEM_H_
25#define _DER_ITEM_H_
26
27#if __has_include(<security_libDER/libDER/libDER_config.h>)
28 #include <security_libDER/libDER/libDER_config.h>
29#else
30 #include <libDER/libDER_config.h>
31#endif
32
33__BEGIN_DECLS
34
35/*
36 * Primary representation of a block of memory.
37 */
38typedef struct {
39 DERByte *data;
40 DERSize length;
41} DERItem;
42
43__END_DECLS
44
45#endif /* _DER_ITEM_H_ */
46
47
lib/libc/include/x86_64-macos-gnu/libDER/libDER_config.h deleted-121
......@@ -1,121 +0,0 @@
1/*
2 * Copyright (c) 2005-2007,2011-2012,2014 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/*
26 * libDER_config.h - platform dependent #defines and typedefs for libDER
27 *
28 */
29
30#ifndef _LIB_DER_CONFIG_H_
31#define _LIB_DER_CONFIG_H_
32
33#include <stddef.h>
34#include <stdint.h>
35#include <string.h>
36
37#if defined(WIN32) && defined(__cplusplus)
38
39#if !defined(__BEGIN_DECLS) || !defined(__END_DECLS)
40#define __BEGIN_DECLS extern "C" {
41#define __END_DECLS }
42#endif // __BEGIN_DECLS || __END_DECLS
43
44#else
45#include <sys/cdefs.h>
46#endif // defined(WIN32) && defined(__cplusplus)
47
48__BEGIN_DECLS
49
50/*
51 * Basic data types: unsigned 8-bit integer, unsigned 32-bit integer
52 */
53typedef uint8_t DERByte;
54typedef uint16_t DERShort;
55typedef size_t DERSize;
56
57
58/*
59 * Use these #defines of you have memset, memmove, and memcmp; else
60 * write your own equivalents.
61 */
62
63#define DERMemset(ptr, c, len) memset(ptr, c, len)
64#define DERMemmove(dst, src, len) memmove(dst, src, len)
65#define DERMemcmp(b1, b2, len) memcmp(b1, b2, len)
66
67
68/***
69 *** Compile time options to trim size of the library.
70 ***/
71
72/* enable general DER encode */
73#define DER_ENCODE_ENABLE 1
74
75/* enable general DER decode */
76#define DER_DECODE_ENABLE 1
77
78#ifndef DER_MULTIBYTE_TAGS
79/* enable multibyte tag support. */
80#define DER_MULTIBYTE_TAGS 1
81#endif
82
83#ifndef DER_TAG_SIZE
84/* Iff DER_MULTIBYTE_TAGS is 1 this is the sizeof(DERTag) in bytes. Note that
85 tags are still encoded and decoded from a minimally encoded DER
86 represantation. This value maintains compatibility with libImg4Decode/Encode. */
87#define DER_TAG_SIZE 8
88#endif
89
90
91/* ---------------------- Do not edit below this line ---------------------- */
92
93/*
94 * Logical representation of a tag (the encoded representation is always in
95 * the minimal number of bytes). The top 3 bits encode class and method
96 * The remaining bits encode the tag value. To obtain smaller DERItemSpecs
97 * sizes, choose the smallest type that fits your needs. Most standard ASN.1
98 * usage only needs single byte tags, but ocasionally custom applications
99 * require a larger tag namespace.
100 */
101#if DER_MULTIBYTE_TAGS
102
103#if DER_TAG_SIZE == 1
104typedef uint8_t DERTag;
105#elif DER_TAG_SIZE == 2
106typedef uint16_t DERTag;
107#elif DER_TAG_SIZE == 4
108typedef uint32_t DERTag;
109#elif DER_TAG_SIZE == 8
110typedef uint64_t DERTag;
111#else
112#error DER_TAG_SIZE invalid
113#endif
114
115#else /* DER_MULTIBYTE_TAGS */
116typedef DERByte DERTag;
117#endif /* !DER_MULTIBYTE_TAGS */
118
119__END_DECLS
120
121#endif /* _LIB_DER_CONFIG_H_ */
lib/libc/include/x86_64-macos-gnu/libkern/OSAtomicDeprecated.h+12-101
......@@ -35,14 +35,13 @@
3535 * is preferred.
3636 */
3737
38#include <Availability.h>
39
4038#if !(defined(OSATOMIC_USE_INLINED) && OSATOMIC_USE_INLINED)
4139
4240#include <sys/cdefs.h>
4341#include <stddef.h>
4442#include <stdint.h>
4543#include <stdbool.h>
44#include <Availability.h>
4645
4746#ifndef OSATOMIC_DEPRECATED
4847#define OSATOMIC_DEPRECATED 1
......@@ -162,7 +161,7 @@ __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
162161int32_t OSAtomicAdd32Barrier( int32_t __theAmount, volatile int32_t *__theValue );
163162
164163
165#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_1 || TARGET_OS_DRIVERKIT
164#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_1
166165
167166/*! @abstract Atomically increments a 32-bit value.
168167 @result Returns the new value.
......@@ -249,7 +248,7 @@ int64_t OSAtomicAdd64Barrier( int64_t __theAmount,
249248 volatile OSAtomic_int64_aligned64_t *__theValue );
250249
251250
252#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_1 || TARGET_OS_DRIVERKIT
251#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_1
253252
254253/*! @abstract Atomically increments a 64-bit value.
255254 @result Returns the new value.
......@@ -362,7 +361,7 @@ int32_t OSAtomicOr32Orig( uint32_t __theMask, volatile uint32_t *__theValue );
362361 This function performs the bitwise OR of the value given by <code>__theMask</code>
363362 with the value in the memory location referenced by <code>__theValue</code>,
364363 storing the result back to that memory location atomically.
365
364
366365 This function is equivalent to {@link OSAtomicOr32Orig}
367366 except that it also introduces a barrier.
368367 @result Returns the original value referenced by <code>__theValue</code>.
......@@ -482,7 +481,7 @@ int32_t OSAtomicXor32Orig( uint32_t __theMask, volatile uint32_t *__theValue );
482481OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_xor)
483482__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_2)
484483int32_t OSAtomicXor32OrigBarrier( uint32_t __theMask, volatile uint32_t *__theValue );
485
484
486485
487486/*! @group Compare and swap
488487 * Functions in this group return true if the swap occured. There are several versions,
......@@ -588,7 +587,7 @@ bool OSAtomicCompareAndSwapIntBarrier( int __oldValue, int __newValue, volatile
588587 match, this function stores the value from <code>__newValue</code> into
589588 that memory location atomically.
590589
591 This function is equivalent to {@link OSAtomicCompareAndSwap32} on 32-bit architectures,
590 This function is equivalent to {@link OSAtomicCompareAndSwap32} on 32-bit architectures,
592591 or {@link OSAtomicCompareAndSwap64} on 64-bit architectures.
593592 @result Returns TRUE on a match, FALSE otherwise.
594593 */
......@@ -607,7 +606,7 @@ bool OSAtomicCompareAndSwapLong( long __oldValue, long __newValue, volatile long
607606 This function is equivalent to {@link OSAtomicCompareAndSwapLong}
608607 except that it also introduces a barrier.
609608
610 This function is equivalent to {@link OSAtomicCompareAndSwap32} on 32-bit architectures,
609 This function is equivalent to {@link OSAtomicCompareAndSwap32} on 32-bit architectures,
611610 or {@link OSAtomicCompareAndSwap64} on 64-bit architectures.
612611 @result Returns TRUE on a match, FALSE otherwise.
613612 */
......@@ -707,7 +706,7 @@ bool OSAtomicTestAndSetBarrier( uint32_t __n, volatile void *__theAddress );
707706 For example, if <code>__theAddress</code> points to a 64-bit value,
708707 to compare the value of the most significant bit, you would specify
709708 <code>56</code> for <code>__n</code>.
710
709
711710 @result
712711 Returns the original value of the bit being tested.
713712 */
......@@ -720,15 +719,15 @@ bool OSAtomicTestAndClear( uint32_t __n, volatile void *__theAddress );
720719 @discussion
721720 This function tests a bit in the value referenced by <code>__theAddress</code>
722721 and if it is not cleared, clears it.
723
722
724723 The bit is chosen by the value of <code>__n</code> such that the
725724 operation will be performed on bit <code>(0x80 >> (__n & 7))</code>
726725 of byte <code>((char *)__theAddress + (n >> 3))</code>.
727
726
728727 For example, if <code>__theAddress</code> points to a 64-bit value,
729728 to compare the value of the most significant bit, you would specify
730729 <code>56</code> for <code>__n</code>.
731
730
732731 This function is equivalent to {@link OSAtomicTestAndSet}
733732 except that it also introduces a barrier.
734733 @result
......@@ -737,7 +736,7 @@ bool OSAtomicTestAndClear( uint32_t __n, volatile void *__theAddress );
737736OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_and)
738737__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
739738bool OSAtomicTestAndClearBarrier( uint32_t __n, volatile void *__theAddress );
740
739
741740
742741/*! @group Memory barriers */
743742
......@@ -1175,92 +1174,4 @@ __END_DECLS
11751174
11761175#endif // defined(OSATOMIC_USE_INLINED) && OSATOMIC_USE_INLINED
11771176
1178#if TARGET_OS_OSX || TARGET_OS_DRIVERKIT
1179
1180__BEGIN_DECLS
1181
1182/*! @group Lockless atomic fifo enqueue and dequeue
1183 * These routines manipulate singly-linked FIFO lists.
1184 *
1185 * This API is deprecated and no longer recommended
1186 */
1187
1188/*! @abstract The data structure for a fifo queue head.
1189 @discussion
1190 You should always initialize a fifo queue head structure with the
1191 initialization vector {@link OS_ATOMIC_FIFO_QUEUE_INIT} before use.
1192 */
1193#if defined(__LP64__)
1194
1195typedef volatile struct {
1196 void *opaque1;
1197 void *opaque2;
1198 int opaque3;
1199} __attribute__ ((aligned (16))) OSFifoQueueHead;
1200
1201#else
1202
1203typedef volatile struct {
1204 void *opaque1;
1205 void *opaque2;
1206 int opaque3;
1207} OSFifoQueueHead;
1208
1209#endif
1210/*! @abstract The initialization vector for a fifo queue head. */
1211#define OS_ATOMIC_FIFO_QUEUE_INIT { NULL, NULL, 0 }
1212
1213/*! @abstract Enqueue an element onto a list.
1214 @discussion
1215 Memory barriers are incorporated as needed to permit thread-safe access
1216 to the queue element.
1217 @param __list
1218 The list on which you want to enqueue the element.
1219 @param __new
1220 The element to add.
1221 @param __offset
1222 The "offset" parameter is the offset (in bytes) of the link field
1223 from the beginning of the data structure being queued (<code>__new</code>).
1224 The link field should be a pointer type.
1225 The <code>__offset</code> value needs to be same for all enqueuing and
1226 dequeuing operations on the same list, even if different structure types
1227 are enqueued on that list. The use of <code>offsetset()</code>, defined in
1228 <code>stddef.h</code> is the common way to specify the <code>__offset</code>
1229 value.
1230
1231 @note
1232 This API is deprecated and no longer recommended
1233 */
1234__API_DEPRECATED("No longer supported", macos(10.7, 11.0))
1235void OSAtomicFifoEnqueue( OSFifoQueueHead *__list, void *__new, size_t __offset);
1236
1237/*! @abstract Dequeue an element from a list.
1238 @discussion
1239 Memory barriers are incorporated as needed to permit thread-safe access
1240 to the queue element.
1241 @param __list
1242 The list from which you want to dequeue an element.
1243 @param __offset
1244 The "offset" parameter is the offset (in bytes) of the link field
1245 from the beginning of the data structure being dequeued (<code>__new</code>).
1246 The link field should be a pointer type.
1247 The <code>__offset</code> value needs to be same for all enqueuing and
1248 dequeuing operations on the same list, even if different structure types
1249 are enqueued on that list. The use of <code>offsetset()</code>, defined in
1250 <code>stddef.h</code> is the common way to specify the <code>__offset</code>
1251 value.
1252 @result
1253 Returns the oldest enqueued element, or <code>NULL</code> if the
1254 list is empty.
1255
1256 @note
1257 This API is deprecated and no longer recommended
1258 */
1259__API_DEPRECATED("No longer supported", macos(10.7, 11.0))
1260void* OSAtomicFifoDequeue( OSFifoQueueHead *__list, size_t __offset);
1261
1262__END_DECLS
1263
1264#endif /* TARGET_OS_OSX || TARGET_OS_DRIVERKIT */
1265
12661177#endif /* _OSATOMIC_DEPRECATED_H_ */
lib/libc/include/x86_64-macos-gnu/libkern/OSAtomicQueue.h+77-1
......@@ -28,7 +28,6 @@
2828#include <sys/cdefs.h>
2929#include <stdint.h>
3030#include <stdbool.h>
31#include "OSAtomicDeprecated.h"
3231
3332#include <Availability.h>
3433
......@@ -110,6 +109,83 @@ void OSAtomicEnqueue( OSQueueHead *__list, void *__new, size_t __offset);
110109__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0)
111110void* OSAtomicDequeue( OSQueueHead *__list, size_t __offset);
112111
112#if defined(__x86_64__) || defined(__i386__)
113
114/*! @group Lockless atomic fifo enqueue and dequeue
115 * These routines manipulate singly-linked FIFO lists.
116 */
117
118/*! @abstract The data structure for a fifo queue head.
119 @discussion
120 You should always initialize a fifo queue head structure with the
121 initialization vector {@link OS_ATOMIC_FIFO_QUEUE_INIT} before use.
122 */
123#if defined(__x86_64__)
124
125typedef volatile struct {
126 void *opaque1;
127 void *opaque2;
128 int opaque3;
129} __attribute__ ((aligned (16))) OSFifoQueueHead;
130
131#else
132
133typedef volatile struct {
134 void *opaque1;
135 void *opaque2;
136 int opaque3;
137} OSFifoQueueHead;
138
139#endif
140
141/*! @abstract The initialization vector for a fifo queue head. */
142#define OS_ATOMIC_FIFO_QUEUE_INIT { NULL, NULL, 0 }
143
144/*! @abstract Enqueue an element onto a list.
145 @discussion
146 Memory barriers are incorporated as needed to permit thread-safe access
147 to the queue element.
148 @param __list
149 The list on which you want to enqueue the element.
150 @param __new
151 The element to add.
152 @param __offset
153 The "offset" parameter is the offset (in bytes) of the link field
154 from the beginning of the data structure being queued (<code>__new</code>).
155 The link field should be a pointer type.
156 The <code>__offset</code> value needs to be same for all enqueuing and
157 dequeuing operations on the same list, even if different structure types
158 are enqueued on that list. The use of <code>offsetset()</code>, defined in
159 <code>stddef.h</code> is the common way to specify the <code>__offset</code>
160 value.
161 */
162__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA)
163void OSAtomicFifoEnqueue( OSFifoQueueHead *__list, void *__new, size_t __offset);
164
165/*! @abstract Dequeue an element from a list.
166 @discussion
167 Memory barriers are incorporated as needed to permit thread-safe access
168 to the queue element.
169 @param __list
170 The list from which you want to dequeue an element.
171 @param __offset
172 The "offset" parameter is the offset (in bytes) of the link field
173 from the beginning of the data structure being dequeued (<code>__new</code>).
174 The link field should be a pointer type.
175 The <code>__offset</code> value needs to be same for all enqueuing and
176 dequeuing operations on the same list, even if different structure types
177 are enqueued on that list. The use of <code>offsetset()</code>, defined in
178 <code>stddef.h</code> is the common way to specify the <code>__offset</code>
179 value.
180 @result
181 Returns the oldest enqueued element, or <code>NULL</code> if the
182 list is empty.
183 */
184__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA)
185void* OSAtomicFifoDequeue( OSFifoQueueHead *__list, size_t __offset);
186
187#endif /* __i386__ || __x86_64__ */
188
113189__END_DECLS
114190
115191#endif /* _OSATOMICQUEUE_H_ */
lib/libc/include/x86_64-macos-gnu/libkern/OSByteOrder.h+7-19
......@@ -37,22 +37,10 @@
3737#define OSSwapConstInt32(x) __DARWIN_OSSwapConstInt32(x)
3838#define OSSwapConstInt64(x) __DARWIN_OSSwapConstInt64(x)
3939
40#if !defined(__DARWIN_OS_INLINE)
41# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
42# define __DARWIN_OS_INLINE static inline
43# elif defined(__MWERKS__) || defined(__cplusplus)
44# define __DARWIN_OS_INLINE static inline
45# else
46# define __DARWIN_OS_INLINE static __inline__
47# endif
48#endif
49
5040#if defined(__GNUC__)
5141
5242#if (defined(__i386__) || defined(__x86_64__))
5343#include <libkern/i386/OSByteOrder.h>
54#elif defined (__arm__) || defined(__arm64__)
55#include <libkern/arm/OSByteOrder.h>
5644#else
5745#include <libkern/machine/OSByteOrder.h>
5846#endif
......@@ -73,7 +61,7 @@ enum {
7361 OSBigEndian
7462};
7563
76__DARWIN_OS_INLINE
64OS_INLINE
7765int32_t
7866OSHostByteOrder(void)
7967{
......@@ -97,7 +85,7 @@ OSHostByteOrder(void)
9785
9886/* Functions for loading native endian values. */
9987
100__DARWIN_OS_INLINE
88OS_INLINE
10189uint16_t
10290_OSReadInt16(
10391 const volatile void * base,
......@@ -107,7 +95,7 @@ _OSReadInt16(
10795 return *(volatile uint16_t *)((uintptr_t)base + byteOffset);
10896}
10997
110__DARWIN_OS_INLINE
98OS_INLINE
11199uint32_t
112100_OSReadInt32(
113101 const volatile void * base,
......@@ -117,7 +105,7 @@ _OSReadInt32(
117105 return *(volatile uint32_t *)((uintptr_t)base + byteOffset);
118106}
119107
120__DARWIN_OS_INLINE
108OS_INLINE
121109uint64_t
122110_OSReadInt64(
123111 const volatile void * base,
......@@ -129,7 +117,7 @@ _OSReadInt64(
129117
130118/* Functions for storing native endian values. */
131119
132__DARWIN_OS_INLINE
120OS_INLINE
133121void
134122_OSWriteInt16(
135123 volatile void * base,
......@@ -140,7 +128,7 @@ _OSWriteInt16(
140128 *(volatile uint16_t *)((uintptr_t)base + byteOffset) = data;
141129}
142130
143__DARWIN_OS_INLINE
131OS_INLINE
144132void
145133_OSWriteInt32(
146134 volatile void * base,
......@@ -151,7 +139,7 @@ _OSWriteInt32(
151139 *(volatile uint32_t *)((uintptr_t)base + byteOffset) = data;
152140}
153141
154__DARWIN_OS_INLINE
142OS_INLINE
155143void
156144_OSWriteInt64(
157145 volatile void * base,
lib/libc/include/x86_64-macos-gnu/libkern/_OSByteOrder.h+16-19
......@@ -41,14 +41,14 @@
4141
4242/* Macros for swapping constant values in the preprocessing stage. */
4343#define __DARWIN_OSSwapConstInt16(x) \
44 ((__uint16_t)((((__uint16_t)(x) & 0xff00U) >> 8) | \
45 (((__uint16_t)(x) & 0x00ffU) << 8)))
44 ((__uint16_t)((((__uint16_t)(x) & 0xff00) >> 8) | \
45 (((__uint16_t)(x) & 0x00ff) << 8)))
4646
4747#define __DARWIN_OSSwapConstInt32(x) \
48 ((__uint32_t)((((__uint32_t)(x) & 0xff000000U) >> 24) | \
49 (((__uint32_t)(x) & 0x00ff0000U) >> 8) | \
50 (((__uint32_t)(x) & 0x0000ff00U) << 8) | \
51 (((__uint32_t)(x) & 0x000000ffU) << 24)))
48 ((__uint32_t)((((__uint32_t)(x) & 0xff000000) >> 24) | \
49 (((__uint32_t)(x) & 0x00ff0000) >> 8) | \
50 (((__uint32_t)(x) & 0x0000ff00) << 8) | \
51 (((__uint32_t)(x) & 0x000000ff) << 24)))
5252
5353#define __DARWIN_OSSwapConstInt64(x) \
5454 ((__uint64_t)((((__uint64_t)(x) & 0xff00000000000000ULL) >> 56) | \
......@@ -62,23 +62,10 @@
6262
6363#if defined(__GNUC__)
6464
65#if !defined(__DARWIN_OS_INLINE)
66# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
67# define __DARWIN_OS_INLINE static inline
68# elif defined(__MWERKS__) || defined(__cplusplus)
69# define __DARWIN_OS_INLINE static inline
70# else
71# define __DARWIN_OS_INLINE static __inline__
72# endif
73#endif
74
7565#if defined(__i386__) || defined(__x86_64__)
7666#include <libkern/i386/_OSByteOrder.h>
7767#endif
7868
79#if defined (__arm__) || defined(__arm64__)
80#include <libkern/arm/OSByteOrder.h>
81#endif
8269
8370
8471#define __DARWIN_OSSwapInt16(x) \
......@@ -94,6 +81,16 @@
9481
9582#if defined(__i386__) || defined(__x86_64__)
9683
84#if !defined(__DARWIN_OS_INLINE)
85# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
86# define __DARWIN_OS_INLINE static inline
87# elif defined(__MWERKS__) || defined(__cplusplus)
88# define __DARWIN_OS_INLINE static inline
89# else
90# define __DARWIN_OS_INLINE static __inline__
91# endif
92#endif
93
9794__DARWIN_OS_INLINE
9895uint16_t
9996_OSSwapInt16(
lib/libc/include/x86_64-macos-gnu/mach-o/dyld.h-9
......@@ -112,15 +112,6 @@ extern void _tlv_atexit(void (*termFunc)(void* objAddr), void* objAddr) __O
112112 */
113113extern void _tlv_bootstrap(void) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0) DYLD_DRIVERKIT_UNAVAILABLE ;
114114
115
116/*
117 * Dylibs that are incorporated into the dyld cache are removed from disk. That means code
118 * cannot stat() the file to see if it "exists". This function is like a stat() call that checks if a
119 * path is to a dylib that was removed from disk and is incorporated into the active dyld cache.
120 */
121extern bool _dyld_shared_cache_contains_path(const char* path) __API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)) DYLD_DRIVERKIT_UNAVAILABLE;
122
123
124115/*
125116 * The following dyld API's are deprecated as of Mac OS X 10.5. They are either
126117 * no longer necessary or are superceeded by dlopen and friends in <dlfcn.h>.
lib/libc/include/x86_64-macos-gnu/mach-o/loader.h+7-31
......@@ -115,14 +115,11 @@ struct mach_header_64 {
115115#define MH_DYLIB 0x6 /* dynamically bound shared library */
116116#define MH_DYLINKER 0x7 /* dynamic link editor */
117117#define MH_BUNDLE 0x8 /* dynamically bound bundle file */
118#define MH_DYLIB_STUB 0x9 /* shared library stub for static
119 linking only, no section contents */
120#define MH_DSYM 0xa /* companion file with only debug
121 sections */
118#define MH_DYLIB_STUB 0x9 /* shared library stub for static */
119 /* linking only, no section contents */
120#define MH_DSYM 0xa /* companion file with only debug */
121 /* sections */
122122#define MH_KEXT_BUNDLE 0xb /* x86_64 kexts */
123#define MH_FILESET 0xc /* a file composed of other Mach-Os to
124 be run in the same userspace sharing
125 a single linkedit. */
126123
127124/* Constants for the flags field of the mach_header */
128125#define MH_NOUNDEFS 0x1 /* the object file has no undefined
......@@ -325,7 +322,6 @@ struct load_command {
325322#define LC_BUILD_VERSION 0x32 /* build for platform min OS version */
326323#define LC_DYLD_EXPORTS_TRIE (0x33 | LC_REQ_DYLD) /* used with linkedit_data_command, payload is trie */
327324#define LC_DYLD_CHAINED_FIXUPS (0x34 | LC_REQ_DYLD) /* used with linkedit_data_command */
328#define LC_FILESET_ENTRY (0x35 | LC_REQ_DYLD) /* used with fileset_entry_command */
329325
330326/*
331327 * A variable length string in a load command is represented by an lc_str
......@@ -1269,6 +1265,9 @@ struct build_tool_version {
12691265#define PLATFORM_WATCHOS 4
12701266#define PLATFORM_BRIDGEOS 5
12711267#define PLATFORM_MACCATALYST 6
1268#if (!defined(PLATFORM_MACCATALYST))
1269#define PLATFORM_MACCATALYST 6
1270#endif
12721271#define PLATFORM_IOSSIMULATOR 7
12731272#define PLATFORM_TVOSSIMULATOR 8
12741273#define PLATFORM_WATCHOSSIMULATOR 9
......@@ -1575,27 +1574,4 @@ struct note_command {
15751574 uint64_t size; /* length of data region */
15761575};
15771576
1578/*
1579 * LC_FILESET_ENTRY commands describe constituent Mach-O files that are part
1580 * of a fileset. In one implementation, entries are dylibs with individual
1581 * mach headers and repositionable text and data segments. Each entry is
1582 * further described by its own mach header.
1583 */
1584struct fileset_entry_command {
1585 uint32_t cmd; /* LC_FILESET_ENTRY */
1586 uint32_t cmdsize; /* includes entry_id string */
1587 uint64_t vmaddr; /* memory address of the entry */
1588 uint64_t fileoff; /* file offset of the entry */
1589 union lc_str entry_id; /* contained entry id */
1590 uint32_t reserved; /* reserved */
1591};
1592
1593/*
1594 * These deprecated values may still be used within Apple but are mechanically
1595 * removed from public API. The mechanical process may produce unusual results.
1596 */
1597#if (!defined(PLATFORM_MACCATALYST))
1598#define PLATFORM_MACCATALYST PLATFORM_MACCATALYST
1599#endif
1600
16011577#endif /* _MACHO_LOADER_H_ */
lib/libc/include/x86_64-macos-gnu/mach/i386/_structs.h-80
......@@ -603,48 +603,7 @@ _STRUCT_X86_DEBUG_STATE32
603603 unsigned int __dr6;
604604 unsigned int __dr7;
605605};
606
607#define _STRUCT_X86_INSTRUCTION_STATE struct __x86_instruction_state
608_STRUCT_X86_INSTRUCTION_STATE
609{
610 int __insn_stream_valid_bytes;
611 int __insn_offset;
612 int __out_of_synch; /*
613 * non-zero when the cacheline that includes the insn_offset
614 * is replaced in the insn_bytes array due to a mismatch
615 * detected when comparing it with the same cacheline in memory
616 */
617#define _X86_INSTRUCTION_STATE_MAX_INSN_BYTES (2448 - 64 - 4)
618 __uint8_t __insn_bytes[_X86_INSTRUCTION_STATE_MAX_INSN_BYTES];
619#define _X86_INSTRUCTION_STATE_CACHELINE_SIZE 64
620 __uint8_t __insn_cacheline[_X86_INSTRUCTION_STATE_CACHELINE_SIZE];
621};
622
623#define _STRUCT_LAST_BRANCH_RECORD struct __last_branch_record
624_STRUCT_LAST_BRANCH_RECORD
625{
626 __uint64_t __from_ip;
627 __uint64_t __to_ip;
628 __uint32_t __mispredict : 1,
629 __tsx_abort : 1,
630 __in_tsx : 1,
631 __cycle_count: 16,
632 __reserved : 13;
633};
634
635#define _STRUCT_LAST_BRANCH_STATE struct __last_branch_state
636_STRUCT_LAST_BRANCH_STATE
637{
638 int __lbr_count;
639 __uint32_t __lbr_supported_tsx : 1,
640 __lbr_supported_cycle_count : 1,
641 __reserved : 30;
642#define __LASTBRANCH_MAX 32
643 _STRUCT_LAST_BRANCH_RECORD __lbrs[__LASTBRANCH_MAX];
644};
645
646606#else /* !__DARWIN_UNIX03 */
647
648607#define _STRUCT_X86_DEBUG_STATE32 struct x86_debug_state32
649608_STRUCT_X86_DEBUG_STATE32
650609{
......@@ -657,45 +616,6 @@ _STRUCT_X86_DEBUG_STATE32
657616 unsigned int dr6;
658617 unsigned int dr7;
659618};
660
661#define _STRUCT_X86_INSTRUCTION_STATE struct __x86_instruction_state
662_STRUCT_X86_INSTRUCTION_STATE
663{
664 int insn_stream_valid_bytes;
665 int insn_offset;
666 int out_of_synch; /*
667 * non-zero when the cacheline that includes the insn_offset
668 * is replaced in the insn_bytes array due to a mismatch
669 * detected when comparing it with the same cacheline in memory
670 */
671#define x86_INSTRUCTION_STATE_MAX_INSN_BYTES (2448 - 64 - 4)
672 __uint8_t insn_bytes[x86_INSTRUCTION_STATE_MAX_INSN_BYTES];
673#define x86_INSTRUCTION_STATE_CACHELINE_SIZE 64
674 __uint8_t insn_cacheline[x86_INSTRUCTION_STATE_CACHELINE_SIZE];
675};
676
677#define _STRUCT_LAST_BRANCH_RECORD struct __last_branch_record
678_STRUCT_LAST_BRANCH_RECORD
679{
680 __uint64_t from_ip;
681 __uint64_t to_ip;
682 __uint32_t mispredict : 1,
683 tsx_abort : 1,
684 in_tsx : 1,
685 cycle_count: 16,
686 reserved : 13;
687};
688
689#define _STRUCT_LAST_BRANCH_STATE struct __last_branch_state
690_STRUCT_LAST_BRANCH_STATE
691{
692 int lbr_count;
693 __uint32_t lbr_supported_tsx : 1,
694 lbr_supported_cycle_count : 1,
695 reserved : 30;
696#define __LASTBRANCH_MAX 32
697 _STRUCT_LAST_BRANCH_RECORD lbrs[__LASTBRANCH_MAX];
698};
699619#endif /* !__DARWIN_UNIX03 */
700620
701621#define _STRUCT_X86_PAGEIN_STATE struct __x86_pagein_state
lib/libc/include/x86_64-macos-gnu/mach/i386/thread_state.h+1-1
......@@ -32,7 +32,7 @@
3232#ifndef _MACH_I386_THREAD_STATE_H_
3333#define _MACH_I386_THREAD_STATE_H_
3434
35/* Size of maximum exported thread state in 32-bit words */
35/* Size of maximum exported thread state in words */
3636#define I386_THREAD_STATE_MAX (614) /* Size of biggest state possible */
3737
3838#if defined (__i386__) || defined(__x86_64__)
lib/libc/include/x86_64-macos-gnu/mach/i386/thread_status.h+1-18
......@@ -1,5 +1,5 @@
11/*
2 * Copyright (c) 2000-2020 Apple Computer, Inc. All rights reserved.
2 * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.
33 *
44 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55 *
......@@ -121,8 +121,6 @@
121121#define x86_AVX512_STATE (x86_AVX512_STATE32 + 2)
122122#define x86_PAGEIN_STATE 22
123123#define x86_THREAD_FULL_STATE64 23
124#define x86_INSTRUCTION_STATE 24
125#define x86_LAST_BRANCH_STATE 25
126124
127125/*
128126 * Largest state on this machine:
......@@ -157,8 +155,6 @@
157155 (x == x86_AVX512_STATE64) || \
158156 (x == x86_AVX512_STATE) || \
159157 (x == x86_PAGEIN_STATE) || \
160 (x == x86_INSTRUCTION_STATE) || \
161 (x == x86_LAST_BRANCH_STATE) || \
162158 (x == THREAD_STATE_NONE))
163159
164160struct x86_state_hdr {
......@@ -263,19 +259,6 @@ typedef _STRUCT_X86_PAGEIN_STATE x86_pagein_state_t;
263259
264260#define X86_PAGEIN_STATE_COUNT x86_PAGEIN_STATE_COUNT
265261
266typedef _STRUCT_X86_INSTRUCTION_STATE x86_instruction_state_t;
267#define x86_INSTRUCTION_STATE_COUNT \
268 ((mach_msg_type_number_t)(sizeof(x86_instruction_state_t) / sizeof(int)))
269
270#define X86_INSTRUCTION_STATE_COUNT x86_INSTRUCTION_STATE_COUNT
271
272typedef _STRUCT_LAST_BRANCH_STATE last_branch_state_t;
273#define x86_LAST_BRANCH_STATE_COUNT \
274 ((mach_msg_type_number_t)(sizeof(last_branch_state_t) / sizeof(int)))
275
276#define X86_LAST_BRANCH_STATE_COUNT x86_LAST_BRANCH_STATE_COUNT
277
278
279262/*
280263 * Combined thread, float and exception states
281264 */
lib/libc/include/x86_64-macos-gnu/mach/i386/vm_param.h+35-22
......@@ -90,34 +90,47 @@
9090#ifndef _MACH_I386_VM_PARAM_H_
9191#define _MACH_I386_VM_PARAM_H_
9292
93#if !defined(KERNEL) && !defined(__ASSEMBLER__)
94
95#include <mach/vm_page_size.h>
96#endif
97
9893#define BYTE_SIZE 8 /* byte size in bits */
9994
10095#define I386_PGBYTES 4096 /* bytes per 80386 page */
10196#define I386_PGSHIFT 12 /* bitshift for pages */
10297
103
104#if !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || (__MAC_OS_X_VERSION_MIN_REQUIRED < 101600)
105#define PAGE_SHIFT I386_PGSHIFT
10698#define PAGE_SIZE I386_PGBYTES
107#define PAGE_MASK (PAGE_SIZE-1)
108#else /* !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || (__MAC_OS_X_VERSION_MIN_REQUIRED < 101600) */
109#define PAGE_SHIFT vm_page_shift
110#define PAGE_SIZE vm_page_size
111#define PAGE_MASK vm_page_mask
112#endif /* !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || (__MAC_OS_X_VERSION_MIN_REQUIRED < 101600) */
113
114#define PAGE_MAX_SHIFT 14
115#define PAGE_MAX_SIZE (1 << PAGE_MAX_SHIFT)
116#define PAGE_MAX_MASK (PAGE_MAX_SIZE-1)
117
118#define PAGE_MIN_SHIFT 12
119#define PAGE_MIN_SIZE (1 << PAGE_MIN_SHIFT)
120#define PAGE_MIN_MASK (PAGE_MIN_SIZE-1)
99#define PAGE_SHIFT I386_PGSHIFT
100#define PAGE_MASK (PAGE_SIZE - 1)
101
102#define PAGE_MAX_SHIFT PAGE_SHIFT
103#define PAGE_MAX_SIZE PAGE_SIZE
104#define PAGE_MAX_MASK PAGE_MASK
105
106#define PAGE_MIN_SHIFT PAGE_SHIFT
107#define PAGE_MIN_SIZE PAGE_SIZE
108#define PAGE_MIN_MASK PAGE_MASK
109
110#define I386_LPGBYTES 2*1024*1024 /* bytes per large page */
111#define I386_LPGSHIFT 21 /* bitshift for large pages */
112#define I386_LPGMASK (I386_LPGBYTES-1)
113
114/*
115 * Convert bytes to pages and convert pages to bytes.
116 * No rounding is used.
117 */
118
119#define i386_btop(x) ((ppnum_t)((x) >> I386_PGSHIFT))
120#define machine_btop(x) i386_btop(x)
121#define i386_ptob(x) (((pmap_paddr_t)(x)) << I386_PGSHIFT)
122#define machine_ptob(x) i386_ptob(x)
123
124/*
125 * Round off or truncate to the nearest page. These will work
126 * for either addresses or counts. (i.e. 1 byte rounds to 1 page
127 * bytes.
128 */
129
130#define i386_round_page(x) ((((pmap_paddr_t)(x)) + I386_PGBYTES - 1) & \
131 ~(I386_PGBYTES-1))
132#define i386_trunc_page(x) (((pmap_paddr_t)(x)) & ~(I386_PGBYTES-1))
133
121134
122135
123136#define VM_MIN_ADDRESS64 ((user_addr_t) 0x0000000000000000ULL)
lib/libc/include/x86_64-macos-gnu/mach/i386/vm_types.h+1
......@@ -70,6 +70,7 @@
7070#ifndef ASSEMBLER
7171
7272#include <i386/_types.h>
73#include <mach/i386/vm_param.h>
7374#include <stdint.h>
7475
7576/*
lib/libc/include/x86_64-macos-gnu/mach/kern_return.h-4
......@@ -323,10 +323,6 @@
323323/* The provided buffer is of insufficient size for the requested data.
324324 */
325325
326#define KERN_DENIED 53
327/* Denied by security policy
328 */
329
330326#define KERN_RETURN_MAX 0x100
331327/* Maximum return value allowable
332328 */
lib/libc/include/x86_64-macos-gnu/mach/mach_port.h+7-7
......@@ -226,7 +226,7 @@ extern
226226#endif /* mig_external */
227227kern_return_t mach_port_get_set_status
228228(
229 ipc_space_read_t task,
229 ipc_space_inspect_t task,
230230 mach_port_name_t name,
231231 mach_port_name_array_t *members,
232232 mach_msg_type_number_t *membersCnt
......@@ -312,7 +312,7 @@ extern
312312#endif /* mig_external */
313313kern_return_t mach_port_get_attributes
314314(
315 ipc_space_read_t task,
315 ipc_space_inspect_t task,
316316 mach_port_name_t name,
317317 mach_port_flavor_t flavor,
318318 mach_port_info_t port_info_out,
......@@ -398,7 +398,7 @@ extern
398398#endif /* mig_external */
399399kern_return_t mach_port_space_info
400400(
401 ipc_space_read_t space,
401 ipc_space_inspect_t task,
402402 ipc_info_space_t *space_info,
403403 ipc_info_name_array_t *table_info,
404404 mach_msg_type_number_t *table_infoCnt,
......@@ -428,7 +428,7 @@ extern
428428#endif /* mig_external */
429429kern_return_t mach_port_kernel_object
430430(
431 ipc_space_read_t task,
431 ipc_space_inspect_t task,
432432 mach_port_name_t name,
433433 unsigned *object_type,
434434 unsigned *object_addr
......@@ -468,7 +468,7 @@ extern
468468#endif /* mig_external */
469469kern_return_t mach_port_get_context
470470(
471 ipc_space_read_t task,
471 ipc_space_inspect_t task,
472472 mach_port_name_t name,
473473 mach_port_context_t *context
474474);
......@@ -494,7 +494,7 @@ extern
494494#endif /* mig_external */
495495kern_return_t mach_port_kobject
496496(
497 ipc_space_read_t task,
497 ipc_space_inspect_t task,
498498 mach_port_name_t name,
499499 natural_t *object_type,
500500 mach_vm_address_t *object_addr
......@@ -603,7 +603,7 @@ extern
603603#endif /* mig_external */
604604kern_return_t mach_port_kobject_description
605605(
606 ipc_space_read_t task,
606 ipc_space_inspect_t task,
607607 mach_port_name_t name,
608608 natural_t *object_type,
609609 mach_vm_address_t *object_addr,
lib/libc/include/x86_64-macos-gnu/mach/mach_time.h created+73
......@@ -0,0 +1,73 @@
1/*
2 * Copyright (c) 2001-2005 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_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. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
14 *
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28
29#ifndef _MACH_MACH_TIME_H_
30#define _MACH_MACH_TIME_H_
31
32#include <mach/mach_types.h>
33#include <sys/cdefs.h>
34#include <Availability.h>
35
36struct mach_timebase_info {
37 uint32_t numer;
38 uint32_t denom;
39};
40
41typedef struct mach_timebase_info *mach_timebase_info_t;
42typedef struct mach_timebase_info mach_timebase_info_data_t;
43
44__BEGIN_DECLS
45
46kern_return_t mach_timebase_info(
47 mach_timebase_info_t info);
48
49kern_return_t mach_wait_until(
50 uint64_t deadline);
51
52
53uint64_t mach_absolute_time(void);
54
55__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0)
56uint64_t mach_approximate_time(void);
57
58/*
59 * like mach_absolute_time, but advances during sleep
60 */
61__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
62uint64_t mach_continuous_time(void);
63
64/*
65 * like mach_approximate_time, but advances during sleep
66 */
67__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
68uint64_t mach_continuous_approximate_time(void);
69
70
71__END_DECLS
72
73#endif /* _MACH_MACH_TIME_H_ */
lib/libc/include/x86_64-macos-gnu/mach/mach_traps.h+6
......@@ -131,6 +131,12 @@ extern kern_return_t _kernelrpc_mach_port_allocate_trap(
131131 mach_port_name_t *name
132132 );
133133
134
135extern kern_return_t _kernelrpc_mach_port_destroy_trap(
136 mach_port_name_t target,
137 mach_port_name_t name
138 );
139
134140extern kern_return_t _kernelrpc_mach_port_deallocate_trap(
135141 mach_port_name_t target,
136142 mach_port_name_t name
lib/libc/include/x86_64-macos-gnu/mach/mach_types.h+2-31
......@@ -117,17 +117,12 @@
117117 */
118118typedef mach_port_t task_t;
119119typedef mach_port_t task_name_t;
120typedef mach_port_t task_policy_set_t;
121typedef mach_port_t task_policy_get_t;
122120typedef mach_port_t task_inspect_t;
123typedef mach_port_t task_read_t;
124121typedef mach_port_t task_suspension_token_t;
125122typedef mach_port_t thread_t;
126123typedef mach_port_t thread_act_t;
127124typedef mach_port_t thread_inspect_t;
128typedef mach_port_t thread_read_t;
129125typedef mach_port_t ipc_space_t;
130typedef mach_port_t ipc_space_read_t;
131126typedef mach_port_t ipc_space_inspect_t;
132127typedef mach_port_t coalition_t;
133128typedef mach_port_t host_t;
......@@ -143,8 +138,6 @@ typedef mach_port_t alarm_t;
143138typedef mach_port_t clock_serv_t;
144139typedef mach_port_t clock_ctrl_t;
145140typedef mach_port_t arcade_register_t;
146typedef mach_port_t ipc_eventlink_t;
147typedef mach_port_t eventlink_port_pair_t[2];
148141typedef mach_port_t suid_cred_t;
149142
150143
......@@ -166,7 +159,6 @@ typedef exception_handler_t *exception_handler_array_t;
166159typedef mach_port_t vm_task_entry_t;
167160typedef mach_port_t io_master_t;
168161typedef mach_port_t UNDServerRef;
169typedef mach_port_t mach_eventlink_t;
170162
171163/*
172164 * Mig doesn't translate the components of an array.
......@@ -220,15 +212,12 @@ typedef uint32_t suid_cred_uid_t;
220212
221213#define TASK_NULL ((task_t) 0)
222214#define TASK_NAME_NULL ((task_name_t) 0)
223#define TASK_INSPECT_NULL ((task_inspect_t) 0)
224#define TASK_READ_NULL ((task_read_t) 0)
215#define TASK_INSPECT_NULL ((task_inspect_t) 0)
225216#define THREAD_NULL ((thread_t) 0)
226217#define THREAD_INSPECT_NULL ((thread_inspect_t) 0)
227#define THREAD_READ_NULL ((thread_read_t) 0)
228218#define TID_NULL ((uint64_t) 0)
229219#define THR_ACT_NULL ((thread_act_t) 0)
230220#define IPC_SPACE_NULL ((ipc_space_t) 0)
231#define IPC_SPACE_READ_NULL ((ipc_space_read_t) 0)
232221#define IPC_SPACE_INSPECT_NULL ((ipc_space_inspect_t) 0)
233222#define COALITION_NULL ((coalition_t) 0)
234223#define HOST_NULL ((host_t) 0)
......@@ -243,25 +232,7 @@ typedef uint32_t suid_cred_uid_t;
243232#define CLOCK_NULL ((clock_t) 0)
244233#define UND_SERVER_NULL ((UNDServerRef) 0)
245234#define ARCADE_REG_NULL ((arcade_register_t) 0)
246#define MACH_EVENTLINK_NULL ((mach_eventlink_t) 0)
247#define IPC_EVENTLINK_NULL ((ipc_eventlink_t) 0)
248#define SUID_CRED_NULL ((suid_cred_t) 0)
249
250/* capability strictly _DECREASING_.
251 * not ordered the other way around because we want TASK_FLAVOR_CONTROL
252 * to be closest to the itk_lock. see task.h.
253 */
254typedef unsigned int mach_task_flavor_t;
255#define TASK_FLAVOR_CONTROL 0 /* a task_t */
256#define TASK_FLAVOR_READ 1 /* a task_read_t */
257#define TASK_FLAVOR_INSPECT 2 /* a task_inspect_t */
258#define TASK_FLAVOR_NAME 3 /* a task_name_t */
259
260/* capability strictly _DECREASING_ */
261typedef unsigned int mach_thread_flavor_t;
262#define THREAD_FLAVOR_CONTROL 0 /* a thread_t */
263#define THREAD_FLAVOR_READ 1 /* a thread_read_t */
264#define THREAD_FLAVOR_INSPECT 2 /* a thread_inspect_t */
235#define SUID_CRED_NULL ((suid_cred_t) 0)
265236
266237/* DEPRECATED */
267238typedef natural_t ledger_item_t;
lib/libc/include/x86_64-macos-gnu/mach/machine.h+2-18
......@@ -118,9 +118,6 @@ typedef integer_t cpu_threadtype_t;
118118#define CPU_TYPE_POWERPC ((cpu_type_t) 18)
119119#define CPU_TYPE_POWERPC64 (CPU_TYPE_POWERPC | CPU_ARCH_ABI64)
120120/* skip ((cpu_type_t) 19) */
121/* skip ((cpu_type_t) 20 */
122/* skip ((cpu_type_t) 21 */
123/* skip ((cpu_type_t) 22 */
124121
125122/*
126123 * Machine subtypes (these are defined here, instead of in a machine
......@@ -133,14 +130,7 @@ typedef integer_t cpu_threadtype_t;
133130 */
134131#define CPU_SUBTYPE_MASK 0xff000000 /* mask for feature flags */
135132#define CPU_SUBTYPE_LIB64 0x80000000 /* 64 bit libraries */
136#define CPU_SUBTYPE_PTRAUTH_ABI 0x80000000 /* pointer authentication with versioned ABI */
137133
138/*
139 * When selecting a slice, ANY will pick the slice with the best
140 * grading for the selected cpu_type_t, unlike the "ALL" subtypes,
141 * which are the slices that can run on any hardware for that cpu type.
142 */
143#define CPU_SUBTYPE_ANY ((cpu_subtype_t) -1)
144134
145135/*
146136 * Object files that are hand-crafted to run on any
......@@ -375,7 +365,9 @@ typedef integer_t cpu_threadtype_t;
375365#define CPUFAMILY_INTEL_BROADWELL 0x582ed09c
376366#define CPUFAMILY_INTEL_SKYLAKE 0x37fc219f
377367#define CPUFAMILY_INTEL_KABYLAKE 0x0f817246
368#if !defined(RC_HIDE_XNU_ICELAKE)
378369#define CPUFAMILY_INTEL_ICELAKE 0x38435547
370#endif /* not RC_HIDE_XNU_ICELAKE */
379371#if !defined(RC_HIDE_XNU_COMETLAKE)
380372#define CPUFAMILY_INTEL_COMETLAKE 0x1cf8a03e
381373#endif /* not RC_HIDE_XNU_COMETLAKE */
......@@ -394,14 +386,6 @@ typedef integer_t cpu_threadtype_t;
394386#define CPUFAMILY_ARM_MONSOON_MISTRAL 0xe81e7ef6
395387#define CPUFAMILY_ARM_VORTEX_TEMPEST 0x07d34b9f
396388#define CPUFAMILY_ARM_LIGHTNING_THUNDER 0x462504d2
397#define CPUFAMILY_ARM_FIRESTORM_ICESTORM 0x1b588bb3
398
399#define CPUSUBFAMILY_UNKNOWN 0
400#define CPUSUBFAMILY_ARM_HP 1
401#define CPUSUBFAMILY_ARM_HG 2
402#define CPUSUBFAMILY_ARM_M 3
403#define CPUSUBFAMILY_ARM_HS 4
404#define CPUSUBFAMILY_ARM_HC_HD 5
405389
406390/* The following synonyms are deprecated: */
407391#define CPUFAMILY_INTEL_6_23 CPUFAMILY_INTEL_PENRYN
lib/libc/include/x86_64-macos-gnu/mach/machine/_structs.h-2
......@@ -31,8 +31,6 @@
3131
3232#if defined (__i386__) || defined(__x86_64__)
3333#include "mach/i386/_structs.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/_structs.h"
3634#else
3735#error architecture not supported
3836#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/boolean.h-2
......@@ -31,8 +31,6 @@
3131
3232#if defined (__i386__) || defined(__x86_64__)
3333#include "mach/i386/boolean.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/boolean.h"
3634#else
3735#error architecture not supported
3836#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/exception.h-2
......@@ -31,8 +31,6 @@
3131
3232#if defined (__i386__) || defined(__x86_64__)
3333#include "mach/i386/exception.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/exception.h"
3634#else
3735#error architecture not supported
3836#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/kern_return.h-2
......@@ -31,8 +31,6 @@
3131
3232#if defined (__i386__) || defined(__x86_64__)
3333#include "mach/i386/kern_return.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/kern_return.h"
3634#else
3735#error architecture not supported
3836#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/processor_info.h-2
......@@ -31,8 +31,6 @@
3131
3232#if defined (__i386__) || defined(__x86_64__)
3333#include "mach/i386/processor_info.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/processor_info.h"
3634#else
3735#error architecture not supported
3836#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/rpc.h-2
......@@ -31,8 +31,6 @@
3131
3232#if defined (__i386__) || defined(__x86_64__)
3333#include "mach/i386/rpc.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/rpc.h"
3634#else
3735#error architecture not supported
3836#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/thread_state.h-2
......@@ -31,8 +31,6 @@
3131
3232#if defined (__i386__) || defined(__x86_64__)
3333#include "mach/i386/thread_state.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/thread_state.h"
3634#else
3735#error architecture not supported
3836#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/thread_status.h-2
......@@ -31,8 +31,6 @@
3131
3232#if defined (__i386__) || defined(__x86_64__)
3333#include "mach/i386/thread_status.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/thread_status.h"
3634#else
3735#error architecture not supported
3836#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/vm_param.h-2
......@@ -31,8 +31,6 @@
3131
3232#if defined (__i386__) || defined(__x86_64__)
3333#include "mach/i386/vm_param.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/vm_param.h"
3634#else
3735#error architecture not supported
3836#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/vm_types.h-2
......@@ -31,8 +31,6 @@
3131
3232#if defined (__i386__) || defined(__x86_64__)
3333#include "mach/i386/vm_types.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/vm_types.h"
3634#else
3735#error architecture not supported
3836#endif
lib/libc/include/x86_64-macos-gnu/mach/message.h+1-7
......@@ -228,7 +228,6 @@ typedef unsigned int mach_msg_priority_t;
228228
229229#define MACH_MSG_PRIORITY_UNSPECIFIED (mach_msg_priority_t) 0
230230
231
232231typedef unsigned int mach_msg_type_name_t;
233232
234233#define MACH_MSG_TYPE_MOVE_RECEIVE 16 /* Must hold receive right */
......@@ -500,9 +499,6 @@ typedef struct{
500499 mach_port_name_t sender;
501500} msg_labels_t;
502501
503typedef int mach_msg_filter_id;
504#define MACH_MSG_FILTER_POLICY_ALLOW (mach_msg_filter_id)0
505
506502/*
507503 * Trailer type to pass MAC policy label info as a mach message trailer.
508504 *
......@@ -515,7 +511,7 @@ typedef struct{
515511 security_token_t msgh_sender;
516512 audit_token_t msgh_audit;
517513 mach_port_context_t msgh_context;
518 mach_msg_filter_id msgh_ad;
514 int msgh_ad;
519515 msg_labels_t msgh_labels;
520516} mach_msg_mac_trailer_t;
521517
......@@ -803,8 +799,6 @@ typedef kern_return_t mach_msg_return_t;
803799/* compatibility: no longer a returned error */
804800#define MACH_SEND_NO_GRANT_DEST 0x10000016
805801/* The destination port doesn't accept ports in body */
806#define MACH_SEND_MSG_FILTERED 0x10000017
807/* Message send was rejected by message filter */
808802
809803#define MACH_RCV_IN_PROGRESS 0x10004001
810804/* Thread is waiting for receive. (Internal use only.) */
lib/libc/include/x86_64-macos-gnu/mach/port.h+1-8
......@@ -339,9 +339,6 @@ typedef struct mach_port_qos {
339339#define MPO_STRICT 0x20 /* Apply strict guarding for port */
340340#define MPO_DENAP_RECEIVER 0x40 /* Mark the port as App de-nap receiver */
341341#define MPO_IMMOVABLE_RECEIVE 0x80 /* Mark the port as immovable; protected by the guard context */
342#define MPO_FILTER_MSG 0x100 /* Allow message filtering */
343#define MPO_TG_BLOCK_TRACKING 0x200 /* Track blocking relationship for thread group during sync IPC */
344
345342/*
346343 * Structure to define optional attributes for a newly
347344 * constructed port.
......@@ -349,10 +346,7 @@ typedef struct mach_port_qos {
349346typedef struct mach_port_options {
350347 uint32_t flags; /* Flags defining attributes for port */
351348 mach_port_limits_t mpl; /* Message queue limit for port */
352 union {
353 uint64_t reserved[2]; /* Reserved */
354 mach_port_name_t work_interval_port; /* Work interval port */
355 };
349 uint64_t reserved[2]; /* Reserved */
356350}mach_port_options_t;
357351
358352typedef mach_port_options_t *mach_port_options_ptr_t;
......@@ -373,7 +367,6 @@ enum mach_port_guard_exception_codes {
373367 kGUARD_EXC_INCORRECT_GUARD = 1u << 4,
374368 kGUARD_EXC_IMMOVABLE = 1u << 5,
375369 kGUARD_EXC_STRICT_REPLY = 1u << 6,
376 kGUARD_EXC_MSG_FILTERED = 1u << 7,
377370 /* start of [optionally] non-fatal guards */
378371 kGUARD_EXC_INVALID_RIGHT = 1u << 8,
379372 kGUARD_EXC_INVALID_NAME = 1u << 9,
lib/libc/include/x86_64-macos-gnu/mach/processor_set.h+2-47
......@@ -49,7 +49,7 @@ typedef function_table_entry *function_table_t;
4949#endif /* AUTOTEST */
5050
5151#ifndef processor_set_MSG_COUNT
52#define processor_set_MSG_COUNT 11
52#define processor_set_MSG_COUNT 10
5353#endif /* processor_set_MSG_COUNT */
5454
5555#include <mach/std_types.h>
......@@ -200,20 +200,6 @@ kern_return_t processor_set_info
200200 mach_msg_type_number_t *info_outCnt
201201);
202202
203/* Routine processor_set_tasks_with_flavor */
204#ifdef mig_external
205mig_external
206#else
207extern
208#endif /* mig_external */
209kern_return_t processor_set_tasks_with_flavor
210(
211 processor_set_t processor_set,
212 mach_task_flavor_t flavor,
213 task_array_t *task_list,
214 mach_msg_type_number_t *task_listCnt
215);
216
217203__END_DECLS
218204
219205/********************** Caution **************************/
......@@ -350,18 +336,6 @@ __END_DECLS
350336#ifdef __MigPackStructs
351337#pragma pack(pop)
352338#endif
353
354#ifdef __MigPackStructs
355#pragma pack(push, 4)
356#endif
357 typedef struct {
358 mach_msg_header_t Head;
359 NDR_record_t NDR;
360 mach_task_flavor_t flavor;
361 } __Request__processor_set_tasks_with_flavor_t __attribute__((unused));
362#ifdef __MigPackStructs
363#pragma pack(pop)
364#endif
365339#endif /* !__Request__processor_set_subsystem__defined */
366340
367341/* union of all requests */
......@@ -379,7 +353,6 @@ union __RequestUnion__processor_set_subsystem {
379353 __Request__processor_set_policy_control_t Request_processor_set_policy_control;
380354 __Request__processor_set_stack_usage_t Request_processor_set_stack_usage;
381355 __Request__processor_set_info_t Request_processor_set_info;
382 __Request__processor_set_tasks_with_flavor_t Request_processor_set_tasks_with_flavor;
383356};
384357#endif /* !__RequestUnion__processor_set_subsystem__defined */
385358/* typedefs for all replies */
......@@ -526,22 +499,6 @@ union __RequestUnion__processor_set_subsystem {
526499#ifdef __MigPackStructs
527500#pragma pack(pop)
528501#endif
529
530#ifdef __MigPackStructs
531#pragma pack(push, 4)
532#endif
533 typedef struct {
534 mach_msg_header_t Head;
535 /* start of the kernel processed data */
536 mach_msg_body_t msgh_body;
537 mach_msg_ool_ports_descriptor_t task_list;
538 /* end of the kernel processed data */
539 NDR_record_t NDR;
540 mach_msg_type_number_t task_listCnt;
541 } __Reply__processor_set_tasks_with_flavor_t __attribute__((unused));
542#ifdef __MigPackStructs
543#pragma pack(pop)
544#endif
545502#endif /* !__Reply__processor_set_subsystem__defined */
546503
547504/* union of all replies */
......@@ -559,7 +516,6 @@ union __ReplyUnion__processor_set_subsystem {
559516 __Reply__processor_set_policy_control_t Reply_processor_set_policy_control;
560517 __Reply__processor_set_stack_usage_t Reply_processor_set_stack_usage;
561518 __Reply__processor_set_info_t Reply_processor_set_info;
562 __Reply__processor_set_tasks_with_flavor_t Reply_processor_set_tasks_with_flavor;
563519};
564520#endif /* !__RequestUnion__processor_set_subsystem__defined */
565521
......@@ -574,8 +530,7 @@ union __ReplyUnion__processor_set_subsystem {
574530 { "processor_set_threads", 4006 },\
575531 { "processor_set_policy_control", 4007 },\
576532 { "processor_set_stack_usage", 4008 },\
577 { "processor_set_info", 4009 },\
578 { "processor_set_tasks_with_flavor", 4010 }
533 { "processor_set_info", 4009 }
579534#endif
580535
581536#ifdef __AfterMigUserHeader
lib/libc/include/x86_64-macos-gnu/mach/task.h+14-14
......@@ -279,7 +279,7 @@ __WATCHOS_PROHIBITED
279279__TVOS_PROHIBITED
280280kern_return_t task_get_exception_ports
281281(
282 task_t task,
282 task_inspect_t task,
283283 exception_mask_t exception_mask,
284284 exception_mask_array_t masks,
285285 mach_msg_type_number_t *masksCnt,
......@@ -372,7 +372,7 @@ __WATCHOS_PROHIBITED
372372__TVOS_PROHIBITED
373373kern_return_t task_policy_set
374374(
375 task_policy_set_t task,
375 task_t task,
376376 task_policy_flavor_t flavor,
377377 task_policy_t policy_info,
378378 mach_msg_type_number_t policy_infoCnt
......@@ -388,7 +388,7 @@ __WATCHOS_PROHIBITED
388388__TVOS_PROHIBITED
389389kern_return_t task_policy_get
390390(
391 task_policy_get_t task,
391 task_t task,
392392 task_policy_flavor_t flavor,
393393 task_policy_t policy_info,
394394 mach_msg_type_number_t *policy_infoCnt,
......@@ -487,7 +487,7 @@ __WATCHOS_PROHIBITED
487487__TVOS_PROHIBITED
488488kern_return_t task_zone_info
489489(
490 task_inspect_t target_task,
490 task_t target_task,
491491 mach_zone_name_array_t *names,
492492 mach_msg_type_number_t *namesCnt,
493493 task_zone_info_array_t *info,
......@@ -527,7 +527,7 @@ extern
527527#endif /* mig_external */
528528kern_return_t task_get_assignment
529529(
530 task_inspect_t task,
530 task_t task,
531531 processor_set_name_t *assigned_set
532532);
533533
......@@ -559,7 +559,7 @@ __WATCHOS_PROHIBITED
559559__TVOS_PROHIBITED
560560kern_return_t task_get_state
561561(
562 task_read_t task,
562 task_t task,
563563 thread_state_flavor_t flavor,
564564 thread_state_t old_state,
565565 mach_msg_type_number_t *old_stateCnt
......@@ -631,7 +631,7 @@ extern
631631#endif /* mig_external */
632632kern_return_t task_purgable_info
633633(
634 task_inspect_t task,
634 task_t task,
635635 task_purgable_info_t *stats
636636);
637637
......@@ -645,7 +645,7 @@ __WATCHOS_PROHIBITED
645645__TVOS_PROHIBITED
646646kern_return_t task_get_mach_voucher
647647(
648 task_read_t task,
648 task_t task,
649649 mach_voucher_selector_t which,
650650 ipc_voucher_t *voucher
651651);
......@@ -700,7 +700,7 @@ extern
700700kern_return_t task_map_corpse_info
701701(
702702 task_t task,
703 task_read_t corspe_task,
703 task_t corspe_task,
704704 vm_address_t *kcd_addr_begin,
705705 uint32_t *kcd_size
706706);
......@@ -739,7 +739,7 @@ extern
739739#endif /* mig_external */
740740kern_return_t task_get_dyld_image_infos
741741(
742 task_read_t task,
742 task_inspect_t task,
743743 dyld_kernel_image_info_array_t *dyld_images,
744744 mach_msg_type_number_t *dyld_imagesCnt
745745);
......@@ -791,7 +791,7 @@ extern
791791kern_return_t task_map_corpse_info_64
792792(
793793 task_t task,
794 task_read_t corspe_task,
794 task_t corspe_task,
795795 mach_vm_address_t *kcd_addr_begin,
796796 mach_vm_size_t *kcd_size
797797);
......@@ -1022,7 +1022,7 @@ __END_DECLS
10221022 NDR_record_t NDR;
10231023 thread_state_flavor_t flavor;
10241024 mach_msg_type_number_t new_stateCnt;
1025 natural_t new_state[1296];
1025 natural_t new_state[614];
10261026 } __Request__thread_create_running_t __attribute__((unused));
10271027#ifdef __MigPackStructs
10281028#pragma pack(pop)
......@@ -1331,7 +1331,7 @@ __END_DECLS
13311331 NDR_record_t NDR;
13321332 thread_state_flavor_t flavor;
13331333 mach_msg_type_number_t new_stateCnt;
1334 natural_t new_state[1296];
1334 natural_t new_state[614];
13351335 } __Request__task_set_state_t __attribute__((unused));
13361336#ifdef __MigPackStructs
13371337#pragma pack(pop)
......@@ -2111,7 +2111,7 @@ union __RequestUnion__task_subsystem {
21112111 NDR_record_t NDR;
21122112 kern_return_t RetCode;
21132113 mach_msg_type_number_t old_stateCnt;
2114 natural_t old_state[1296];
2114 natural_t old_state[614];
21152115 } __Reply__task_get_state_t __attribute__((unused));
21162116#ifdef __MigPackStructs
21172117#pragma pack(pop)
lib/libc/include/x86_64-macos-gnu/mach/task_info.h+1-47
......@@ -112,13 +112,8 @@ typedef struct task_basic_info_32 *task_basic_info_32_t;
112112/* Don't use this, use MACH_TASK_BASIC_INFO instead */
113113struct task_basic_info_64 {
114114 integer_t suspend_count; /* suspend count for task */
115#if defined(__arm__) || defined(__arm64__)
116115 mach_vm_size_t virtual_size; /* virtual memory size (bytes) */
117116 mach_vm_size_t resident_size; /* resident memory size (bytes) */
118#else /* defined(__arm__) || defined(__arm64__) */
119 mach_vm_size_t virtual_size; /* virtual memory size (bytes) */
120 mach_vm_size_t resident_size; /* resident memory size (bytes) */
121#endif /* defined(__arm__) || defined(__arm64__) */
122117 time_value_t user_time; /* total user run time for
123118 * terminated threads */
124119 time_value_t system_time; /* total system run time for
......@@ -128,26 +123,9 @@ struct task_basic_info_64 {
128123typedef struct task_basic_info_64 task_basic_info_64_data_t;
129124typedef struct task_basic_info_64 *task_basic_info_64_t;
130125
131#if defined(__arm__) || defined(__arm64__)
132 #if defined(__arm__) && defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_5_0)
133/*
134 * Note: arm64 can't use the old flavor. If you somehow manage to,
135 * you can cope with the nonsense data yourself.
136 */
137 #define TASK_BASIC_INFO_64 5
138 #define TASK_BASIC_INFO_64_COUNT \
139 (sizeof(task_basic_info_64_data_t) / sizeof(natural_t))
140
141 #else
142
143 #define TASK_BASIC_INFO_64 TASK_BASIC_INFO_64_2
144 #define TASK_BASIC_INFO_64_COUNT TASK_BASIC_INFO_64_2_COUNT
145 #endif
146#else /* defined(__arm__) || defined(__arm64__) */
147126#define TASK_BASIC_INFO_64 5 /* 64-bit capable basic info */
148127#define TASK_BASIC_INFO_64_COUNT \
149128 (sizeof(task_basic_info_64_data_t) / sizeof(natural_t))
150#endif
151129
152130
153131/* localized structure - cannot be safely passed between tasks of differing sizes */
......@@ -271,27 +249,6 @@ typedef struct task_dyld_info *task_dyld_info_t;
271249#define TASK_DYLD_ALL_IMAGE_INFO_32 0 /* format value */
272250#define TASK_DYLD_ALL_IMAGE_INFO_64 1 /* format value */
273251
274#if defined(__arm__) || defined(__arm64__)
275
276/* Don't use this, use MACH_TASK_BASIC_INFO instead */
277/* Compatibility for old 32-bit mach_vm_*_t */
278#define TASK_BASIC_INFO_64_2 18 /* 64-bit capable basic info */
279
280struct task_basic_info_64_2 {
281 integer_t suspend_count; /* suspend count for task */
282 mach_vm_size_t virtual_size; /* virtual memory size (bytes) */
283 mach_vm_size_t resident_size; /* resident memory size (bytes) */
284 time_value_t user_time; /* total user run time for
285 * terminated threads */
286 time_value_t system_time; /* total system run time for
287 * terminated threads */
288 policy_t policy; /* default policy for new threads */
289};
290typedef struct task_basic_info_64_2 task_basic_info_64_2_data_t;
291typedef struct task_basic_info_64_2 *task_basic_info_64_2_t;
292#define TASK_BASIC_INFO_64_2_COUNT \
293 (sizeof(task_basic_info_64_2_data_t) / sizeof(natural_t))
294#endif
295252
296253#define TASK_EXTMOD_INFO 19
297254
......@@ -420,7 +377,7 @@ typedef struct task_vm_info *task_vm_info_t;
420377typedef struct vm_purgeable_info task_purgable_info_t;
421378
422379
423#define TASK_TRACE_MEMORY_INFO 24 /* no longer supported */
380#define TASK_TRACE_MEMORY_INFO 24
424381struct task_trace_memory_info {
425382 uint64_t user_memory_address; /* address of start of trace memory buffer */
426383 uint64_t buffer_size; /* size of buffer in bytes */
......@@ -455,9 +412,6 @@ typedef gpu_energy_data *gpu_energy_data_t;
455412struct task_power_info_v2 {
456413 task_power_info_data_t cpu_energy;
457414 gpu_energy_data gpu_energy;
458#if defined(__arm__) || defined(__arm64__)
459 uint64_t task_energy;
460#endif /* defined(__arm__) || defined(__arm64__) */
461415 uint64_t task_ptime;
462416 uint64_t task_pset_switches;
463417};
lib/libc/include/x86_64-macos-gnu/mach/task_policy.h+5-2
......@@ -110,7 +110,8 @@ typedef integer_t *task_policy_t;
110110#define TASK_BASE_LATENCY_QOS_POLICY 10
111111#define TASK_BASE_THROUGHPUT_QOS_POLICY 11
112112
113typedef enum task_role {
113
114enum task_role {
114115 TASK_RENICED = -1,
115116 TASK_UNSPECIFIED = 0,
116117 TASK_FOREGROUND_APPLICATION = 1,
......@@ -121,7 +122,9 @@ typedef enum task_role {
121122 TASK_NONUI_APPLICATION = 6,
122123 TASK_DEFAULT_APPLICATION = 7,
123124 TASK_DARWINBG_APPLICATION = 8,
124} task_role_t;
125};
126
127typedef integer_t task_role_t;
125128
126129struct task_category_policy {
127130 task_role_t role;
lib/libc/include/x86_64-macos-gnu/mach/task_special_ports.h+6-7
......@@ -69,19 +69,18 @@
6969
7070typedef int task_special_port_t;
7171
72#define TASK_KERNEL_PORT 1 /* The full task port for task. */
72#define TASK_KERNEL_PORT 1 /* Represents task to the outside
73 * world.*/
7374
7475#define TASK_HOST_PORT 2 /* The host (priv) port for task. */
7576
76#define TASK_NAME_PORT 3 /* The name port for task. */
77#define TASK_NAME_PORT 3 /* the name (unpriv) port for task */
7778
7879#define TASK_BOOTSTRAP_PORT 4 /* Bootstrap environment for task. */
7980
80#define TASK_INSPECT_PORT 5 /* The inspect port for task. */
81
82#define TASK_READ_PORT 6 /* The read port for task. */
83
84
81/*
82 * Evolving and likely to change.
83 */
8584
8685#define TASK_SEATBELT_PORT 7 /* Seatbelt compiler/DEM port for task. */
8786
lib/libc/include/x86_64-macos-gnu/mach/thread_act.h+12-62
......@@ -49,7 +49,7 @@ typedef function_table_entry *function_table_t;
4949#endif /* AUTOTEST */
5050
5151#ifndef thread_act_MSG_COUNT
52#define thread_act_MSG_COUNT 29
52#define thread_act_MSG_COUNT 28
5353#endif /* thread_act_MSG_COUNT */
5454
5555#include <mach/std_types.h>
......@@ -88,7 +88,7 @@ __WATCHOS_PROHIBITED
8888__TVOS_PROHIBITED
8989kern_return_t act_get_state
9090(
91 thread_read_t target_act,
91 thread_act_t target_act,
9292 int flavor,
9393 thread_state_t old_state,
9494 mach_msg_type_number_t *old_stateCnt
......@@ -119,7 +119,7 @@ extern
119119__WATCHOS_PROHIBITED
120120kern_return_t thread_get_state
121121(
122 thread_read_t target_act,
122 thread_act_t target_act,
123123 thread_state_flavor_t flavor,
124124 thread_state_t old_state,
125125 mach_msg_type_number_t *old_stateCnt
......@@ -211,7 +211,7 @@ __WATCHOS_PROHIBITED
211211__TVOS_PROHIBITED
212212kern_return_t thread_get_special_port
213213(
214 thread_inspect_t thr_act,
214 thread_act_t thr_act,
215215 int which_port,
216216 mach_port_t *special_port
217217);
......@@ -272,7 +272,7 @@ __WATCHOS_PROHIBITED
272272__TVOS_PROHIBITED
273273kern_return_t thread_get_exception_ports
274274(
275 thread_act_t thread,
275 thread_inspect_t thread,
276276 exception_mask_t exception_mask,
277277 exception_mask_array_t masks,
278278 mach_msg_type_number_t *masksCnt,
......@@ -402,7 +402,7 @@ extern
402402#endif /* mig_external */
403403kern_return_t thread_get_assignment
404404(
405 thread_inspect_t thread,
405 thread_act_t thread,
406406 processor_set_name_t *assigned_set
407407);
408408
......@@ -433,7 +433,7 @@ __WATCHOS_PROHIBITED
433433__TVOS_PROHIBITED
434434kern_return_t thread_get_mach_voucher
435435(
436 thread_read_t thr_act,
436 thread_act_t thr_act,
437437 mach_voucher_selector_t which,
438438 ipc_voucher_t *voucher
439439);
......@@ -467,23 +467,6 @@ kern_return_t thread_swap_mach_voucher
467467 ipc_voucher_t *old_voucher
468468);
469469
470/* Routine thread_convert_thread_state */
471#ifdef mig_external
472mig_external
473#else
474extern
475#endif /* mig_external */
476kern_return_t thread_convert_thread_state
477(
478 thread_act_t thread,
479 int direction,
480 thread_state_flavor_t flavor,
481 thread_state_t in_state,
482 mach_msg_type_number_t in_stateCnt,
483 thread_state_t out_state,
484 mach_msg_type_number_t *out_stateCnt
485);
486
487470__END_DECLS
488471
489472/********************** Caution **************************/
......@@ -533,7 +516,7 @@ __END_DECLS
533516 NDR_record_t NDR;
534517 int flavor;
535518 mach_msg_type_number_t new_stateCnt;
536 natural_t new_state[1296];
519 natural_t new_state[614];
537520 } __Request__act_set_state_t __attribute__((unused));
538521#ifdef __MigPackStructs
539522#pragma pack(pop)
......@@ -560,7 +543,7 @@ __END_DECLS
560543 NDR_record_t NDR;
561544 thread_state_flavor_t flavor;
562545 mach_msg_type_number_t new_stateCnt;
563 natural_t new_state[1296];
546 natural_t new_state[614];
564547 } __Request__thread_set_state_t __attribute__((unused));
565548#ifdef __MigPackStructs
566549#pragma pack(pop)
......@@ -868,22 +851,6 @@ __END_DECLS
868851#ifdef __MigPackStructs
869852#pragma pack(pop)
870853#endif
871
872#ifdef __MigPackStructs
873#pragma pack(push, 4)
874#endif
875 typedef struct {
876 mach_msg_header_t Head;
877 NDR_record_t NDR;
878 int direction;
879 thread_state_flavor_t flavor;
880 mach_msg_type_number_t in_stateCnt;
881 natural_t in_state[1296];
882 mach_msg_type_number_t out_stateCnt;
883 } __Request__thread_convert_thread_state_t __attribute__((unused));
884#ifdef __MigPackStructs
885#pragma pack(pop)
886#endif
887854#endif /* !__Request__thread_act_subsystem__defined */
888855
889856/* union of all requests */
......@@ -919,7 +886,6 @@ union __RequestUnion__thread_act_subsystem {
919886 __Request__thread_get_mach_voucher_t Request_thread_get_mach_voucher;
920887 __Request__thread_set_mach_voucher_t Request_thread_set_mach_voucher;
921888 __Request__thread_swap_mach_voucher_t Request_thread_swap_mach_voucher;
922 __Request__thread_convert_thread_state_t Request_thread_convert_thread_state;
923889};
924890#endif /* !__RequestUnion__thread_act_subsystem__defined */
925891/* typedefs for all replies */
......@@ -947,7 +913,7 @@ union __RequestUnion__thread_act_subsystem {
947913 NDR_record_t NDR;
948914 kern_return_t RetCode;
949915 mach_msg_type_number_t old_stateCnt;
950 natural_t old_state[1296];
916 natural_t old_state[614];
951917 } __Reply__act_get_state_t __attribute__((unused));
952918#ifdef __MigPackStructs
953919#pragma pack(pop)
......@@ -973,7 +939,7 @@ union __RequestUnion__thread_act_subsystem {
973939 NDR_record_t NDR;
974940 kern_return_t RetCode;
975941 mach_msg_type_number_t old_stateCnt;
976 natural_t old_state[1296];
942 natural_t old_state[614];
977943 } __Reply__thread_get_state_t __attribute__((unused));
978944#ifdef __MigPackStructs
979945#pragma pack(pop)
......@@ -1293,20 +1259,6 @@ union __RequestUnion__thread_act_subsystem {
12931259#ifdef __MigPackStructs
12941260#pragma pack(pop)
12951261#endif
1296
1297#ifdef __MigPackStructs
1298#pragma pack(push, 4)
1299#endif
1300 typedef struct {
1301 mach_msg_header_t Head;
1302 NDR_record_t NDR;
1303 kern_return_t RetCode;
1304 mach_msg_type_number_t out_stateCnt;
1305 natural_t out_state[1296];
1306 } __Reply__thread_convert_thread_state_t __attribute__((unused));
1307#ifdef __MigPackStructs
1308#pragma pack(pop)
1309#endif
13101262#endif /* !__Reply__thread_act_subsystem__defined */
13111263
13121264/* union of all replies */
......@@ -1342,7 +1294,6 @@ union __ReplyUnion__thread_act_subsystem {
13421294 __Reply__thread_get_mach_voucher_t Reply_thread_get_mach_voucher;
13431295 __Reply__thread_set_mach_voucher_t Reply_thread_set_mach_voucher;
13441296 __Reply__thread_swap_mach_voucher_t Reply_thread_swap_mach_voucher;
1345 __Reply__thread_convert_thread_state_t Reply_thread_convert_thread_state;
13461297};
13471298#endif /* !__RequestUnion__thread_act_subsystem__defined */
13481299
......@@ -1375,8 +1326,7 @@ union __ReplyUnion__thread_act_subsystem {
13751326 { "thread_set_policy", 3624 },\
13761327 { "thread_get_mach_voucher", 3625 },\
13771328 { "thread_set_mach_voucher", 3626 },\
1378 { "thread_swap_mach_voucher", 3627 },\
1379 { "thread_convert_thread_state", 3628 }
1329 { "thread_swap_mach_voucher", 3627 }
13801330#endif
13811331
13821332#ifdef __AfterMigUserHeader
lib/libc/include/x86_64-macos-gnu/mach/thread_special_ports.h+2-5
......@@ -67,11 +67,8 @@
6767#ifndef _MACH_THREAD_SPECIAL_PORTS_H_
6868#define _MACH_THREAD_SPECIAL_PORTS_H_
6969
70#define THREAD_KERNEL_PORT 1 /* The full thread port for thread. */
71
72#define THREAD_INSPECT_PORT 2 /* The inspect port for thread. */
73
74#define THREAD_READ_PORT 3 /* The read port for thread. */
70#define THREAD_KERNEL_PORT 1 /* Represents the thread to the outside
71 * world.*/
7572
7673/*
7774 * Definitions for ease of use
lib/libc/include/x86_64-macos-gnu/mach/thread_status.h-3
......@@ -94,7 +94,4 @@ typedef natural_t thread_state_data_t[THREAD_STATE_MAX];
9494typedef int thread_state_flavor_t;
9595typedef thread_state_flavor_t *thread_state_flavor_array_t;
9696
97#define THREAD_CONVERT_THREAD_STATE_TO_SELF 1
98#define THREAD_CONVERT_THREAD_STATE_FROM_SELF 2
99
10097#endif /* _MACH_THREAD_STATUS_H_ */
lib/libc/include/x86_64-macos-gnu/mach/vm_prot.h-1
......@@ -149,5 +149,4 @@ typedef int vm_prot_t;
149149#define VM_PROT_STRIP_READ ((vm_prot_t) 0x80)
150150#define VM_PROT_EXECUTE_ONLY (VM_PROT_EXECUTE|VM_PROT_STRIP_READ)
151151
152
153152#endif /* _MACH_VM_PROT_H_ */
lib/libc/include/x86_64-macos-gnu/mach/vm_statistics.h+2-29
......@@ -1,5 +1,5 @@
11/*
2 * Copyright (c) 2000-2020 Apple Inc. All rights reserved.
2 * Copyright (c) 2000-2019 Apple Inc. All rights reserved.
33 *
44 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55 *
......@@ -66,12 +66,8 @@
6666#ifndef _MACH_VM_STATISTICS_H_
6767#define _MACH_VM_STATISTICS_H_
6868
69#ifdef __cplusplus
70extern "C" {
71#endif
72
7369#include <mach/machine/vm_types.h>
74#include <mach/machine/kern_return.h>
70
7571
7672/*
7773 * vm_statistics
......@@ -171,8 +167,6 @@ struct vm_statistics64 {
171167typedef struct vm_statistics64 *vm_statistics64_t;
172168typedef struct vm_statistics64 vm_statistics64_data_t;
173169
174kern_return_t vm_stats(void *info, unsigned int *count);
175
176170/*
177171 * VM_STATISTICS_TRUNCATE_TO_32_BIT
178172 *
......@@ -358,7 +352,6 @@ enum virtual_memory_guard_exception_codes {
358352
359353#define VM_MEMORY_MALLOC_NANO 11
360354#define VM_MEMORY_MALLOC_MEDIUM 12
361#define VM_MEMORY_MALLOC_PGUARD 13
362355
363356#define VM_MEMORY_MACH_MSG 20
364357#define VM_MEMORY_IOKIT 21
......@@ -519,22 +512,6 @@ enum virtual_memory_guard_exception_codes {
519512/* memory allocated by CoreMedia for global image registration of frames */
520513#define VM_MEMORY_CM_REGWARP 101
521514
522/* memory allocated by EmbeddedAcousticRecognition for speech decoder */
523#define VM_MEMORY_EAR_DECODER 102
524
525/* CoreUI cached image data */
526#define VM_MEMORY_COREUI_CACHED_IMAGE_DATA 103
527
528/* Reserve 230-239 for Rosetta */
529#define VM_MEMORY_ROSETTA 230
530#define VM_MEMORY_ROSETTA_THREAD_CONTEXT 231
531#define VM_MEMORY_ROSETTA_INDIRECT_BRANCH_MAP 232
532#define VM_MEMORY_ROSETTA_RETURN_STACK 233
533#define VM_MEMORY_ROSETTA_EXECUTABLE_HEAP 234
534#define VM_MEMORY_ROSETTA_USER_LDT 235
535#define VM_MEMORY_ROSETTA_ARENA 236
536#define VM_MEMORY_ROSETTA_10 239
537
538515/* Reserve 240-255 for application */
539516#define VM_MEMORY_APPLICATION_SPECIFIC_1 240
540517#define VM_MEMORY_APPLICATION_SPECIFIC_16 255
......@@ -543,8 +520,4 @@ enum virtual_memory_guard_exception_codes {
543520
544521
545522
546#ifdef __cplusplus
547}
548#endif
549
550523#endif /* _MACH_VM_STATISTICS_H_ */
lib/libc/include/x86_64-macos-gnu/mach/vm_types.h+1-3
......@@ -70,12 +70,10 @@ typedef uint32_t ppnum_t; /* Physical page number */
7070
7171
7272
73typedef mach_port_t vm_map_t, vm_map_read_t, vm_map_inspect_t;
73typedef mach_port_t vm_map_t;
7474
7575
7676#define VM_MAP_NULL ((vm_map_t) 0)
77#define VM_MAP_INSPECT_NULL ((vm_map_inspect_t) 0)
78#define VM_MAP_READ_NULL ((vm_map_read_t) 0)
7977
8078/*
8179 * Evolving definitions, likely to change.
lib/libc/include/x86_64-macos-gnu/machine/_mcontext.h-2
......@@ -27,8 +27,6 @@
2727 */
2828#if defined (__i386__) || defined (__x86_64__)
2929#include "i386/_mcontext.h"
30#elif defined (__arm__) || defined (__arm64__)
31#include "arm/_mcontext.h"
3230#else
3331#error architecture not supported
3432#endif
lib/libc/include/x86_64-macos-gnu/machine/_param.h+1-3
......@@ -26,9 +26,7 @@
2626 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727 */
2828#if defined (__i386__) || defined (__x86_64__)
29#include <i386/_param.h>
30#elif defined (__arm__) || defined (__arm64__)
31#include <arm/_param.h>
29#include "i386/_param.h"
3230#else
3331#error architecture not supported
3432#endif
lib/libc/include/x86_64-macos-gnu/machine/_types.h-2
......@@ -30,8 +30,6 @@
3030
3131#if defined (__i386__) || defined(__x86_64__)
3232#include "i386/_types.h"
33#elif defined (__arm__) || defined (__arm64__)
34#include "arm/_types.h"
3533#else
3634#error architecture not supported
3735#endif
lib/libc/include/x86_64-macos-gnu/machine/endian.h-2
......@@ -33,8 +33,6 @@
3333
3434#if defined (__i386__) || defined(__x86_64__)
3535#include "i386/endian.h"
36#elif defined (__arm__) || defined (__arm64__)
37#include "arm/endian.h"
3836#else
3937#error architecture not supported
4038#endif
lib/libc/include/x86_64-macos-gnu/machine/limits.h-2
......@@ -4,8 +4,6 @@
44 * This file is public domain. */
55#if defined (__i386__) || defined(__x86_64__)
66#include <i386/limits.h>
7#elif defined (__arm__) || defined (__arm64__)
8#include <arm/limits.h>
97#else
108#error architecture not supported
119#endif
lib/libc/include/x86_64-macos-gnu/machine/param.h+1-3
......@@ -32,9 +32,7 @@
3232#define _BSD_MACHINE_PARAM_H_
3333
3434#if defined (__i386__) || defined(__x86_64__)
35#include <i386/param.h>
36#elif defined (__arm__) || defined (__arm64__)
37#include <arm/param.h>
35#include "i386/param.h"
3836#else
3937#error architecture not supported
4038#endif
lib/libc/include/x86_64-macos-gnu/machine/signal.h-2
......@@ -30,8 +30,6 @@
3030
3131#if defined (__i386__) || defined(__x86_64__)
3232#include "i386/signal.h"
33#elif defined (__arm__) || defined (__arm64__)
34#include "arm/signal.h"
3533#else
3634#error architecture not supported
3735#endif
lib/libc/include/x86_64-macos-gnu/machine/types.h-2
......@@ -33,8 +33,6 @@
3333
3434#if defined (__i386__) || defined(__x86_64__)
3535#include "i386/types.h"
36#elif defined (__arm__) || defined (__arm64__)
37#include "arm/types.h"
3836#else
3937#error architecture not supported
4038#endif
lib/libc/include/x86_64-macos-gnu/malloc/_malloc.h+3-3
......@@ -44,9 +44,9 @@ void *realloc(void *__ptr, size_t __size) __result_use_check __alloc_size(2);
4444#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
4545void *valloc(size_t) __alloc_size(1);
4646#endif // !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
47#if (__DARWIN_C_LEVEL >= __DARWIN_C_FULL) || \
48 (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
49 (defined(__cplusplus) && __cplusplus >= 201703L)
47#if (__DARWIN_C_LEVEL >= __DARWIN_C_FULL) && \
48 ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
49 (defined(__cplusplus) && __cplusplus >= 201703L))
5050void *aligned_alloc(size_t __alignment, size_t __size) __result_use_check __alloc_size(2) __OSX_AVAILABLE(10.15) __IOS_AVAILABLE(13.0) __TVOS_AVAILABLE(13.0) __WATCHOS_AVAILABLE(6.0);
5151#endif
5252int posix_memalign(void **__memptr, size_t __alignment, size_t __size) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
lib/libc/include/x86_64-macos-gnu/math.h-4
......@@ -547,7 +547,6 @@ extern long double fmal(long double, long double, long double);
547547#define islessgreater(x, y) __builtin_islessgreater((x),(y))
548548#define isunordered(x, y) __builtin_isunordered((x),(y))
549549
550#if defined __i386__ || defined __x86_64__
551550/* Deprecated functions; use the INFINITY and NAN macros instead. */
552551extern float __inff(void)
553552__API_DEPRECATED("use `(float)INFINITY` instead", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
......@@ -557,7 +556,6 @@ extern long double __infl(void)
557556__API_DEPRECATED("use `(long double)INFINITY` instead", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
558557extern float __nan(void)
559558__API_DEPRECATED("use `NAN` instead", macos(10.0, 10.14)) __API_UNAVAILABLE(ios, watchos, tvos);
560#endif
561559
562560/******************************************************************************
563561 * Reentrant variants of lgamma[fl] *
......@@ -738,7 +736,6 @@ extern int signgam;
738736#define TLOSS 5
739737#define PLOSS 6
740738
741#if defined __i386__ || defined __x86_64__
742739/* Legacy BSD API; use the C99 `lrint( )` function instead. */
743740extern long int rinttol(double)
744741__API_DEPRECATED_WITH_REPLACEMENT("lrint", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
......@@ -757,7 +754,6 @@ __API_DEPRECATED_WITH_REPLACEMENT("tgamma", macos(10.0, 10.9)) __API_UNAVAILABLE
757754/* Legacy BSD API; use `2*frexp( )` or `scalbn(x, -ilogb(x))` instead. */
758755extern double significand(double)
759756__API_DEPRECATED("Use `2*frexp( )` or `scalbn(x, -ilogb(x))` instead.", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
760#endif
761757
762758#if !defined __cplusplus
763759struct exception {
lib/libc/include/x86_64-macos-gnu/net/if.h+1-1
......@@ -1,5 +1,5 @@
11/*
2 * Copyright (c) 2000-2020 Apple Inc. All rights reserved.
2 * Copyright (c) 2000-2019 Apple Inc. All rights reserved.
33 *
44 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55 *
lib/libc/include/x86_64-macos-gnu/net/if_var.h+1-2
......@@ -1,5 +1,5 @@
11/*
2 * Copyright (c) 2000-2020 Apple Inc. All rights reserved.
2 * Copyright (c) 2000-2019 Apple Inc. All rights reserved.
33 *
44 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55 *
......@@ -70,7 +70,6 @@
7070#include <sys/time.h>
7171#include <sys/queue.h> /* get TAILQ macros */
7272#ifdef BSD_KERN_PRIVATE
73#include <net/pktsched/pktsched.h>
7473#include <sys/eventhandler.h>
7574#endif
7675
lib/libc/include/x86_64-macos-gnu/netinet/in.h+2-3
......@@ -63,14 +63,14 @@
6363
6464#ifndef _NETINET_IN_H_
6565#define _NETINET_IN_H_
66
6766#include <sys/appleapiopts.h>
67#include <sys/_types.h>
6868#include <stdint.h> /* uint(8|16|32)_t */
6969
7070#include <Availability.h>
7171
72
7372#include <sys/_types/_in_addr_t.h>
73
7474#include <sys/_types/_in_port_t.h>
7575
7676/*
......@@ -435,7 +435,6 @@ struct ip_opts {
435435#define IP_PKTINFO 26 /* get pktinfo on recv socket, set src on sent dgram */
436436#define IP_RECVPKTINFO IP_PKTINFO /* receive pktinfo w/dgram */
437437#define IP_RECVTOS 27 /* bool; receive IP TOS w/dgram */
438#define IP_DONTFRAG 28 /* don't fragment packet */
439438
440439#define IP_FW_ADD 40 /* add a firewall rule to chain */
441440#define IP_FW_DEL 41 /* delete a firewall rule from chain */
lib/libc/include/x86_64-macos-gnu/netinet/tcp.h+1-3
......@@ -63,13 +63,11 @@
6363
6464#ifndef _NETINET_TCP_H_
6565#define _NETINET_TCP_H_
66#include <sys/types.h>
6667#include <sys/appleapiopts.h>
67
6868#include <machine/endian.h>
6969#include <machine/types.h> /* __uint32_t */
7070
71#include <sys/types.h>
72
7371#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
7472typedef __uint32_t tcp_seq;
7573typedef __uint32_t tcp_cc; /* connection count per rfc1644 */
lib/libc/include/x86_64-macos-gnu/netinet6/in6.h+7-21
......@@ -1,5 +1,5 @@
11/*
2 * Copyright (c) 2008-2020 Apple Inc. All rights reserved.
2 * Copyright (c) 2008-2018 Apple Inc. All rights reserved.
33 *
44 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55 *
......@@ -98,7 +98,6 @@
9898#ifndef _NETINET6_IN6_H_
9999#define _NETINET6_IN6_H_
100100#include <sys/appleapiopts.h>
101
102101#include <sys/_types.h>
103102#include <sys/_types/_sa_family_t.h>
104103
......@@ -179,7 +178,6 @@ struct sockaddr_in6 {
179178
180179
181180
182
183181/*
184182 * Definition of some useful macros to handle IP6 addresses
185183 */
......@@ -208,7 +206,6 @@ struct sockaddr_in6 {
208206#define IN6ADDR_V4MAPPED_INIT \
209207 {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
210208 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}}
211#define IN6ADDR_MULTICAST_PREFIX IN6MASK8
212209#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
213210
214211extern const struct in6_addr in6addr_any;
......@@ -300,16 +297,6 @@ extern const struct in6_addr in6addr_linklocal_allv2routers;
300297 */
301298#define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff)
302299
303#define IPV6_ADDR_MC_FLAGS(a) ((a)->s6_addr[1] & 0xf0)
304
305#define IPV6_ADDR_MC_FLAGS_TRANSIENT 0x10
306#define IPV6_ADDR_MC_FLAGS_PREFIX 0x20
307#define IPV6_ADDR_MC_FLAGS_UNICAST_BASED (IPV6_ADDR_MC_FLAGS_TRANSIENT | IPV6_ADDR_MC_FLAGS_PREFIX)
308
309#define IN6_IS_ADDR_UNICAST_BASED_MULTICAST(a) \
310 (IN6_IS_ADDR_MULTICAST(a) && \
311 (IPV6_ADDR_MC_FLAGS(a) == IPV6_ADDR_MC_FLAGS_UNICAST_BASED))
312
313300/*
314301 * Unique Local IPv6 Unicast Addresses (per RFC 4193)
315302 */
......@@ -324,9 +311,8 @@ extern const struct in6_addr in6addr_linklocal_allv2routers;
324311#define IN6_IS_ADDR_MC_NODELOCAL(a) \
325312 (IN6_IS_ADDR_MULTICAST(a) && \
326313 (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_NODELOCAL))
327#define IN6_IS_ADDR_MC_LINKLOCAL(a) \
328 (IN6_IS_ADDR_MULTICAST(a) && \
329 (IPV6_ADDR_MC_FLAGS(a) != IPV6_ADDR_MC_FLAGS_UNICAST_BASED) && \
314#define IN6_IS_ADDR_MC_LINKLOCAL(a) \
315 (IN6_IS_ADDR_MULTICAST(a) && \
330316 (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_LINKLOCAL))
331317#define IN6_IS_ADDR_MC_SITELOCAL(a) \
332318 (IN6_IS_ADDR_MULTICAST(a) && \
......@@ -383,9 +369,9 @@ extern const struct in6_addr in6addr_linklocal_allv2routers;
383369#define IPV6_SOCKOPT_RESERVED1 3 /* reserved for future use */
384370#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
385371#define IPV6_UNICAST_HOPS 4 /* int; IP6 hops */
386#define IPV6_MULTICAST_IF 9 /* u_int; set/get IP6 multicast i/f */
387#define IPV6_MULTICAST_HOPS 10 /* int; set/get IP6 multicast hops */
388#define IPV6_MULTICAST_LOOP 11 /* u_int; set/get IP6 mcast loopback */
372#define IPV6_MULTICAST_IF 9 /* __uint8_t; set/get IP6 multicast i/f */
373#define IPV6_MULTICAST_HOPS 10 /* __uint8_t; set/get IP6 multicast hops */
374#define IPV6_MULTICAST_LOOP 11 /* __uint8_t; set/get IP6 mcast loopback */
389375#define IPV6_JOIN_GROUP 12 /* ip6_mreq; join a group membership */
390376#define IPV6_LEAVE_GROUP 13 /* ip6_mreq; leave a group membership */
391377
......@@ -677,5 +663,5 @@ extern int inet6_rth_segments(const void *);
677663extern struct in6_addr *inet6_rth_getaddr(const void *, int);
678664
679665__END_DECLS
680#endif /* PLATFORM_DriverKit */
666#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
681667#endif /* !_NETINET6_IN6_H_ */
lib/libc/include/x86_64-macos-gnu/objc/objc-api.h-6
......@@ -96,12 +96,6 @@
9696# define NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER 1
9797#endif
9898
99/* The arm64 ABI requires proper casting to ensure arguments are passed
100 * * correctly. */
101#if defined(__arm64__) && !__swift__
102# undef OBJC_OLD_DISPATCH_PROTOTYPES
103# define OBJC_OLD_DISPATCH_PROTOTYPES 0
104#endif
10599
106100/* OBJC_OLD_DISPATCH_PROTOTYPES == 0 enforces the rule that the dispatch
107101 * functions must be cast to an appropriate function pointer type. */
lib/libc/include/x86_64-macos-gnu/objc/runtime.h+38-33
......@@ -1765,6 +1765,43 @@ OBJC_EXPORT void objc_setHook_getClass(objc_hook_getClass _Nonnull newValue,
17651765 OBJC_AVAILABLE(10.14.4, 12.2, 12.2, 5.2, 3.2);
17661766#endif
17671767
1768/**
1769 * Function type for a hook that assists objc_setAssociatedObject().
1770 *
1771 * @param object The source object for the association.
1772 * @param key The key for the association.
1773 * @param value The value to associate with the key key for object. Pass nil to clear an existing association.
1774 * @param policy The policy for the association. For possible values, see “Associative Object Behaviors.”
1775 *
1776 * @see objc_setAssociatedObject
1777 * @see objc_setHook_setAssociatedObject
1778 */
1779typedef void (*objc_hook_setAssociatedObject)(id _Nonnull object, const void * _Nonnull key,
1780 id _Nullable value, objc_AssociationPolicy policy);
1781
1782/**
1783 * Install a hook for objc_setAssociatedObject().
1784 *
1785 * @param newValue The hook function to install.
1786 * @param outOldValue The address of a function pointer variable. On return,
1787 * the old hook function is stored in the variable.
1788 *
1789 * @note The store to *outOldValue is thread-safe: the variable will be
1790 * updated before objc_setAssociatedObject() calls your new hook to read it,
1791 * even if your new hook is called from another thread before this
1792 * setter completes.
1793 * @note Your hook should always call the previous hook.
1794 *
1795 * @see objc_setAssociatedObject
1796 * @see objc_hook_setAssociatedObject
1797 */
1798#if !(TARGET_OS_OSX && __i386__)
1799#define OBJC_SETASSOCIATEDOBJECTHOOK_DEFINED 1
1800OBJC_EXPORT void objc_setHook_setAssociatedObject(objc_hook_setAssociatedObject _Nonnull newValue,
1801 objc_hook_setAssociatedObject _Nullable * _Nonnull outOldValue)
1802 OBJC_AVAILABLE(10.15, 13.0, 13.0, 6.0, 4.0);
1803#endif
1804
17681805/**
17691806 * Function type for a function that is called when an image is loaded.
17701807 *
......@@ -1792,39 +1829,7 @@ typedef void (*objc_func_loadImage)(const struct mach_header * _Nonnull header);
17921829OBJC_EXPORT void objc_addLoadImageFunc(objc_func_loadImage _Nonnull func)
17931830 OBJC_AVAILABLE(10.15, 13.0, 13.0, 6.0, 4.0);
17941831
1795/**
1796 * Function type for a hook that provides a name for lazily named classes.
1797 *
1798 * @param cls The class to generate a name for.
1799 * @return The name of the class, or NULL if the name isn't known or can't me generated.
1800 *
1801 * @see objc_setHook_lazyClassNamer
1802 */
1803typedef const char * _Nullable (*objc_hook_lazyClassNamer)(_Nonnull Class cls);
1804
1805/**
1806 * Install a hook to provide a name for lazily-named classes.
1807 *
1808 * @param newValue The hook function to install.
1809 * @param outOldValue The address of a function pointer variable. On return,
1810 * the old hook function is stored in the variable.
1811 *
1812 * @note The store to *outOldValue is thread-safe: the variable will be
1813 * updated before objc_getClass() calls your new hook to read it,
1814 * even if your new hook is called from another thread before this
1815 * setter completes.
1816 * @note Your hook must call the previous hook for class names
1817 * that you do not recognize.
1818 */
1819#if !(TARGET_OS_OSX && __i386__)
1820#define OBJC_SETHOOK_LAZYCLASSNAMER_DEFINED 1
1821OBJC_EXPORT
1822void objc_setHook_lazyClassNamer(_Nonnull objc_hook_lazyClassNamer newValue,
1823 _Nonnull objc_hook_lazyClassNamer * _Nonnull oldOutValue)
1824 OBJC_AVAILABLE(11.0, 14.0, 14.0, 7.0, 5.0);
1825#endif
1826
1827/**
1832/**
18281833 * Callback from Objective-C to Swift to perform Swift class initialization.
18291834 */
18301835#if !(TARGET_OS_OSX && __i386__)
lib/libc/include/x86_64-macos-gnu/os/base.h+30-27
......@@ -1,5 +1,5 @@
11/*
2 * Copyright (c) 2008-2020 Apple Inc. All rights reserved.
2 * Copyright (c) 2008-2013 Apple Inc. All rights reserved.
33 *
44 * @APPLE_APACHE_LICENSE_HEADER_START@
55 *
......@@ -23,7 +23,6 @@
2323
2424#include <sys/cdefs.h>
2525
26
2726#ifndef __has_builtin
2827#define __has_builtin(x) 0
2928#endif
......@@ -74,7 +73,7 @@
7473#define OS_ALWAYS_INLINE __attribute__((__always_inline__))
7574#define OS_TRANSPARENT_UNION __attribute__((__transparent_union__))
7675#define OS_ALIGNED(n) __attribute__((__aligned__((n))))
77#define OS_FORMAT_PRINTF(x, y) __attribute__((__format__(printf,x,y)))
76#define OS_FORMAT_PRINTF(x,y) __attribute__((__format__(printf,x,y)))
7877#define OS_EXPORT extern __attribute__((__visibility__("default")))
7978#define OS_INLINE static __inline__
8079#define OS_EXPECT(x, v) __builtin_expect((x), (v))
......@@ -111,7 +110,7 @@
111110#define OS_ALWAYS_INLINE
112111#define OS_TRANSPARENT_UNION
113112#define OS_ALIGNED(n)
114#define OS_FORMAT_PRINTF(x, y)
113#define OS_FORMAT_PRINTF(x,y)
115114#define OS_EXPORT extern
116115#define OS_INLINE static inline
117116#define OS_EXPECT(x, v) (x)
......@@ -125,8 +124,6 @@
125124
126125#if defined(__cplusplus) && defined(__clang__)
127126#define OS_FALLTHROUGH [[clang::fallthrough]]
128#elif __has_attribute(fallthrough)
129#define OS_FALLTHROUGH __attribute__((__fallthrough__))
130127#else
131128#define OS_FALLTHROUGH
132129#endif
......@@ -167,21 +164,30 @@
167164 * -Wassign-enum prevents you from assigning illegal values to a variable of the
168165 * enum type.
169166 */
167#ifndef __OPEN_SOURCE__
168/*!
169 * @internal
170 * <rdar://problem/37799789>
171 */
172#endif // __OPEN_SOURCE__
170173#define __OS_OPTIONS_ATTR __attribute__((flag_enum))
171174#else
172175#define __OS_OPTIONS_ATTR
173176#endif // __has_attribute(flag_enum)
174177
175178#if __has_feature(objc_fixed_enum) || __has_extension(cxx_fixed_enum) || \
176 __has_extension(cxx_strong_enums)
179 __has_extension(cxx_strong_enums)
177180#define OS_ENUM(_name, _type, ...) \
178 typedef enum : _type { __VA_ARGS__ } _name##_t
181 typedef enum : _type { __VA_ARGS__ } _name##_t
179182#define OS_CLOSED_ENUM(_name, _type, ...) \
180 typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR_CLOSED _name##_t
183 typedef enum : _type { __VA_ARGS__ } \
184 __OS_ENUM_ATTR_CLOSED _name##_t
181185#define OS_OPTIONS(_name, _type, ...) \
182 typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR __OS_OPTIONS_ATTR _name##_t
186 typedef enum : _type { __VA_ARGS__ } \
187 __OS_ENUM_ATTR __OS_OPTIONS_ATTR _name##_t
183188#define OS_CLOSED_OPTIONS(_name, _type, ...) \
184 typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR _name##_t
189 typedef enum : _type { __VA_ARGS__ } \
190 __OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR _name##_t
185191#else
186192/*!
187193 * There is unfortunately no good way in plain C to have both fixed-type enums
......@@ -214,25 +220,25 @@
214220 * When compiling in ObjC or C++, both of the above assignments are illegal.
215221 */
216222#define __OS_ENUM_C_FALLBACK(_name, _type, ...) \
217 typedef _type _name##_t; enum _name { __VA_ARGS__ }
223 typedef _type _name##_t; enum _name { __VA_ARGS__ }
218224
219225#define OS_ENUM(_name, _type, ...) \
220 typedef _type _name##_t; enum { __VA_ARGS__ }
226 typedef _type _name##_t; enum { __VA_ARGS__ }
221227#define OS_CLOSED_ENUM(_name, _type, ...) \
222 __OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \
223 __OS_ENUM_ATTR_CLOSED
228 __OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \
229 __OS_ENUM_ATTR_CLOSED
224230#define OS_OPTIONS(_name, _type, ...) \
225 __OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \
226 __OS_ENUM_ATTR __OS_OPTIONS_ATTR
231 __OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \
232 __OS_ENUM_ATTR __OS_OPTIONS_ATTR
227233#define OS_CLOSED_OPTIONS(_name, _type, ...) \
228 __OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \
229 __OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR
234 __OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \
235 __OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR
230236#endif // __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums)
231237
232238#if __has_feature(attribute_availability_swift)
233239// equivalent to __SWIFT_UNAVAILABLE from Availability.h
234240#define OS_SWIFT_UNAVAILABLE(_msg) \
235 __attribute__((__availability__(swift, unavailable, message=_msg)))
241 __attribute__((__availability__(swift, unavailable, message=_msg)))
236242#else
237243#define OS_SWIFT_UNAVAILABLE(_msg)
238244#endif
......@@ -256,12 +262,12 @@
256262
257263#ifdef __GNUC__
258264#define os_prevent_tail_call_optimization() __asm__("")
259#define os_is_compile_time_constant(expr) __builtin_constant_p(expr)
260#define os_compiler_barrier() __asm__ __volatile__("" ::: "memory")
265#define os_is_compile_time_constant(expr) __builtin_constant_p(expr)
266#define os_compiler_barrier() __asm__ __volatile__("" ::: "memory")
261267#else
262268#define os_prevent_tail_call_optimization() do { } while (0)
263#define os_is_compile_time_constant(expr) 0
264#define os_compiler_barrier() do { } while (0)
269#define os_is_compile_time_constant(expr) 0
270#define os_compiler_barrier() do { } while (0)
265271#endif
266272
267273#if __has_attribute(not_tail_called)
......@@ -270,7 +276,6 @@
270276#define OS_NOT_TAIL_CALLED
271277#endif
272278
273
274279typedef void (*os_function_t)(void *_Nullable);
275280
276281#ifdef __BLOCKS__
......@@ -317,6 +322,4 @@ typedef void (*os_function_t)(void *_Nullable);
317322typedef void (^os_block_t)(void);
318323#endif
319324
320
321
322325#endif // __OS_BASE__
lib/libc/include/x86_64-macos-gnu/os/clock.h deleted-18
......@@ -1,18 +0,0 @@
1#ifndef __OS_CLOCK__
2#define __OS_CLOCK__
3
4#include <os/base.h>
5#include <stdint.h>
6
7/*
8 * @typedef os_clockid_t
9 *
10 * @abstract
11 * Describes the kind of clock that the workgroup timestamp parameters are
12 * specified in
13 */
14OS_ENUM(os_clockid, uint32_t,
15 OS_CLOCK_MACH_ABSOLUTE_TIME = 32,
16);
17
18#endif /* __OS_CLOCK__ */
lib/libc/include/x86_64-macos-gnu/os/object.h+6-38
......@@ -98,15 +98,6 @@
9898#endif // __swift__
9999#endif // OS_OBJECT_SWIFT3
100100
101#if __has_feature(assume_nonnull)
102#define OS_OBJECT_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
103#define OS_OBJECT_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
104#else
105#define OS_OBJECT_ASSUME_NONNULL_BEGIN
106#define OS_OBJECT_ASSUME_NONNULL_END
107#endif
108#define OS_OBJECT_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))
109
110101#if OS_OBJECT_USE_OBJC
111102#import <objc/NSObject.h>
112103#if __has_attribute(objc_independent_class)
......@@ -125,9 +116,9 @@
125116#define OS_OBJECT_CLASS_IMPLEMENTS_PROTOCOL(name, proto) \
126117 OS_OBJECT_CLASS_IMPLEMENTS_PROTOCOL_IMPL( \
127118 OS_OBJECT_CLASS(name), OS_OBJECT_CLASS(proto))
128#define OS_OBJECT_DECL_IMPL(name, adhere, ...) \
119#define OS_OBJECT_DECL_IMPL(name, ...) \
129120 OS_OBJECT_DECL_PROTOCOL(name, __VA_ARGS__) \
130 typedef adhere<OS_OBJECT_CLASS(name)> \
121 typedef NSObject<OS_OBJECT_CLASS(name)> \
131122 * OS_OBJC_INDEPENDENT_CLASS name##_t
132123#define OS_OBJECT_DECL_BASE(name, ...) \
133124 @interface OS_OBJECT_CLASS(name) : __VA_ARGS__ \
......@@ -138,9 +129,9 @@
138129 typedef OS_OBJECT_CLASS(name) \
139130 * OS_OBJC_INDEPENDENT_CLASS name##_t
140131#define OS_OBJECT_DECL(name, ...) \
141 OS_OBJECT_DECL_IMPL(name, NSObject, <NSObject>)
132 OS_OBJECT_DECL_IMPL(name, <NSObject>)
142133#define OS_OBJECT_DECL_SUBCLASS(name, super) \
143 OS_OBJECT_DECL_IMPL(name, NSObject, <OS_OBJECT_CLASS(super)>)
134 OS_OBJECT_DECL_IMPL(name, <OS_OBJECT_CLASS(super)>)
144135#if __has_attribute(ns_returns_retained)
145136#define OS_OBJECT_RETURNS_RETAINED __attribute__((__ns_returns_retained__))
146137#else
......@@ -158,8 +149,6 @@
158149#define OS_OBJECT_BRIDGE
159150#define OS_WARN_RESULT_NEEDS_RELEASE OS_WARN_RESULT
160151#endif
161
162
163152#if __has_attribute(objc_runtime_visible) && \
164153 ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \
165154 __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_12) || \
......@@ -174,7 +163,7 @@
174163/*
175164 * To provide backward deployment of ObjC objects in Swift on pre-10.12
176165 * SDKs, OS_object classes can be marked as OS_OBJECT_OBJC_RUNTIME_VISIBLE.
177 * When compiling with a deployment target earlier than OS X 10.12 (iOS 10.0,
166 * When compiling with a deployment target earlier than OS X 10.12 (iOS 10.0,
178167 * tvOS 10.0, watchOS 3.0) the Swift compiler will only refer to this type at
179168 * runtime (using the ObjC runtime).
180169 */
......@@ -198,9 +187,9 @@
198187#define OS_OBJECT_DECL_SUBCLASS_SWIFT(name, super) \
199188 OS_EXPORT OS_OBJECT_OBJC_RUNTIME_VISIBLE \
200189 OS_OBJECT_DECL_IMPL_CLASS(name, OS_OBJECT_CLASS(super))
201#endif // OS_OBJECT_SWIFT3
202190OS_EXPORT OS_OBJECT_OBJC_RUNTIME_VISIBLE
203191OS_OBJECT_DECL_BASE(object, NSObject);
192#endif // OS_OBJECT_SWIFT3
204193#else
205194/*! @parseOnly */
206195#define OS_OBJECT_RETURNS_RETAINED
......@@ -226,27 +215,6 @@ OS_OBJECT_DECL_BASE(object, NSObject);
226215 typedef struct name##_s *name##_t
227216#endif
228217
229#if OS_OBJECT_USE_OBJC
230/* Declares a class of the specific name and exposes the interface and typedefs
231 * name##_t to the pointer to the class */
232#define OS_OBJECT_SHOW_CLASS(name, ...) \
233 OS_EXPORT OS_OBJECT_OBJC_RUNTIME_VISIBLE \
234 OS_OBJECT_DECL_IMPL_CLASS(name, ## __VA_ARGS__ )
235/* Declares a subclass of the same name, and
236 * subclass adheres to protocol specified. Typedefs baseclass<proto> * to subclass##_t */
237#define OS_OBJECT_SHOW_SUBCLASS(subclass_name, super, proto_name) \
238 OS_EXPORT OS_OBJECT_OBJC_RUNTIME_VISIBLE \
239 OS_OBJECT_DECL_BASE(subclass_name, OS_OBJECT_CLASS(super)<OS_OBJECT_CLASS(proto_name)>); \
240 typedef OS_OBJECT_CLASS(super)<OS_OBJECT_CLASS(proto_name)> \
241 * OS_OBJC_INDEPENDENT_CLASS subclass_name##_t
242#else /* Plain C */
243#define OS_OBJECT_DECL_PROTOCOL(name, ...)
244#define OS_OBJECT_SHOW_CLASS(name, ...) \
245 typedef struct name##_s *name##_t
246#define OS_OBJECT_SHOW_SUBCLASS(name, super, ...) \
247 typedef super##_t name##_t
248#endif
249
250218#define OS_OBJECT_GLOBAL_OBJECT(type, object) ((OS_OBJECT_BRIDGE type)&(object))
251219
252220__BEGIN_DECLS
lib/libc/include/x86_64-macos-gnu/os/workgroup.h deleted-37
......@@ -1,37 +0,0 @@
1/*
2 * Copyright (c) 2020 Apple Inc. All rights reserved.
3 *
4 * @APPLE_APACHE_LICENSE_HEADER_START@
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * @APPLE_APACHE_LICENSE_HEADER_END@
19 */
20
21#ifndef __OS_WORKGROUP__
22#define __OS_WORKGROUP__
23
24#ifndef __DISPATCH_BUILDING_DISPATCH__
25#ifndef __OS_WORKGROUP_INDIRECT__
26#define __OS_WORKGROUP_INDIRECT__
27#endif /* __OS_WORKGROUP_INDIRECT__ */
28
29#include <os/workgroup_base.h>
30#include <os/workgroup_object.h>
31#include <os/workgroup_interval.h>
32#include <os/workgroup_parallel.h>
33
34#undef __OS_WORKGROUP_INDIRECT__
35#endif /* __DISPATCH_BUILDING_DISPATCH__ */
36
37#endif /* __OS_WORKGROUP__ */
lib/libc/include/x86_64-macos-gnu/os/workgroup_base.h deleted-78
......@@ -1,78 +0,0 @@
1#ifndef __OS_WORKGROUP_BASE__
2#define __OS_WORKGROUP_BASE__
3
4#ifndef __OS_WORKGROUP_INDIRECT__
5#error "Please #include <os/workgroup.h> instead of this file directly."
6#endif
7
8#include <sys/types.h>
9#include <stddef.h>
10#include <stdint.h>
11#include <stdbool.h>
12#include <string.h>
13#include <stdlib.h>
14
15#include <mach/port.h>
16
17#include <Availability.h>
18#include <os/base.h>
19#include <os/object.h>
20#include <os/clock.h>
21
22#if __has_feature(assume_nonnull)
23#define OS_WORKGROUP_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
24#define OS_WORKGROUP_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
25#else
26#define OS_WORKGROUP_ASSUME_NONNULL_BEGIN
27#define OS_WORKGROUP_ASSUME_NONNULL_END
28#endif
29#define OS_WORKGROUP_WARN_RESULT __attribute__((__warn_unused_result__))
30#define OS_WORKGROUP_EXPORT OS_EXPORT
31#define OS_WORKGROUP_RETURNS_RETAINED OS_OBJECT_RETURNS_RETAINED
32
33#define OS_WORKGROUP_DECL(name, swift_name) \
34 OS_SWIFT_NAME(swift_name) \
35 OS_OBJECT_SHOW_CLASS(name, OS_OBJECT_CLASS(object))
36
37#if OS_OBJECT_USE_OBJC
38#define OS_WORKGROUP_SUBCLASS_DECL_PROTO(name, swift_name, ...) \
39 OS_SWIFT_NAME(swift_name) \
40 OS_OBJECT_DECL_PROTOCOL(name ## __VA_ARGS__ )
41#else
42#define OS_WORKGROUP_SUBCLASS_DECL_PROTO(name, swift_name, ...)
43#endif
44
45#define OS_WORKGROUP_SUBCLASS_DECL(name, super, swift_name, ...) \
46 OS_SWIFT_NAME(swift_name) \
47 OS_OBJECT_SHOW_SUBCLASS(name, super, name, ## __VA_ARGS__)
48
49#if defined(__LP64__)
50#define __OS_WORKGROUP_ATTR_SIZE__ 60
51#define __OS_WORKGROUP_INTERVAL_DATA_SIZE__ 56
52#define __OS_WORKGROUP_JOIN_TOKEN_SIZE__ 36
53#else
54#define __OS_WORKGROUP_ATTR_SIZE__ 60
55#define __OS_WORKGROUP_INTERVAL_DATA_SIZE__ 56
56#define __OS_WORKGROUP_JOIN_TOKEN_SIZE__ 28
57#endif
58
59#define _OS_WORKGROUP_ATTR_SIG_DEFAULT_INIT 0x2FA863B4
60#define _OS_WORKGROUP_ATTR_SIG_EMPTY_INIT 0x2FA863C4
61
62struct OS_REFINED_FOR_SWIFT os_workgroup_attr_opaque_s {
63 uint32_t sig;
64 char opaque[__OS_WORKGROUP_ATTR_SIZE__];
65};
66
67#define _OS_WORKGROUP_INTERVAL_DATA_SIG_INIT 0x52A74C4D
68struct OS_REFINED_FOR_SWIFT os_workgroup_interval_data_opaque_s {
69 uint32_t sig;
70 char opaque[__OS_WORKGROUP_INTERVAL_DATA_SIZE__];
71};
72
73struct OS_REFINED_FOR_SWIFT os_workgroup_join_token_opaque_s {
74 uint32_t sig;
75 char opaque[__OS_WORKGROUP_JOIN_TOKEN_SIZE__];
76};
77
78#endif /* __OS_WORKGROUP_BASE__ */
lib/libc/include/x86_64-macos-gnu/os/workgroup_interval.h deleted-155
......@@ -1,155 +0,0 @@
1/*
2 * Copyright (c) 2020 Apple Inc. All rights reserved.
3 *
4 * @APPLE_APACHE_LICENSE_HEADER_START@
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * @APPLE_APACHE_LICENSE_HEADER_END@
19 */
20
21#ifndef __OS_WORKGROUP_INTERVAL__
22#define __OS_WORKGROUP_INTERVAL__
23
24#ifndef __OS_WORKGROUP_INDIRECT__
25#error "Please #include <os/workgroup.h> instead of this file directly."
26#include <os/workgroup_base.h> // For header doc
27#endif
28
29__BEGIN_DECLS
30
31OS_WORKGROUP_ASSUME_NONNULL_BEGIN
32
33/*!
34 * @typedef os_workgroup_interval_t
35 *
36 * @abstract
37 * A subclass of an os_workgroup_t for tracking work performed as part of
38 * a repeating interval-driven workload.
39 */
40OS_WORKGROUP_SUBCLASS_DECL_PROTO(os_workgroup_interval, Repeatable);
41OS_WORKGROUP_SUBCLASS_DECL(os_workgroup_interval, os_workgroup, WorkGroupInterval);
42
43/* During the first instance of this API, the only supported interval
44 * workgroups are for audio workloads. Please refer to the AudioToolbox
45 * framework for more information.
46 */
47
48/*
49 * @typedef os_workgroup_interval_data, os_workgroup_interval_data_t
50 *
51 * @abstract
52 * An opaque structure containing additional configuration for the workgroup
53 * interval.
54 */
55typedef struct os_workgroup_interval_data_opaque_s os_workgroup_interval_data_s;
56typedef struct os_workgroup_interval_data_opaque_s *os_workgroup_interval_data_t;
57#define OS_WORKGROUP_INTERVAL_DATA_INITIALIZER \
58 { .sig = _OS_WORKGROUP_INTERVAL_DATA_SIG_INIT }
59
60/*!
61 * @function os_workgroup_interval_start
62 *
63 * @abstract
64 * Indicates to the system that the member threads of this
65 * os_workgroup_interval_t have begun working on an instance of the repeatable
66 * interval workload with the specified timestamps. This function is real time
67 * safe.
68 *
69 * This function will set and return an errno in the following cases:
70 *
71 * - The current thread is not a member of the os_workgroup_interval_t
72 * - The os_workgroup_interval_t has been cancelled
73 * - The timestamps passed in are malformed
74 * - os_workgroup_interval_start() was previously called on the
75 * os_workgroup_interval_t without an intervening os_workgroup_interval_finish()
76 * - A concurrent workgroup interval configuration operation is taking place.
77 *
78 * @param start
79 * Start timestamp specified in the os_clockid_t with which the
80 * os_workgroup_interval_t was created. This is generally a time in the past and
81 * indicates when the workgroup started working on an interval period
82 *
83 * @param deadline
84 * Deadline timestamp specified in the os_clockid_t with which the
85 * os_workgroup_interval_t was created. This specifies the deadline which the
86 * interval period would like to meet.
87 *
88 * @param data
89 * This field is currently unused and should be NULL
90 */
91API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
92OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT
93int
94os_workgroup_interval_start(os_workgroup_interval_t wg, uint64_t start, uint64_t
95 deadline, os_workgroup_interval_data_t _Nullable data);
96
97/*!
98 * @function os_workgroup_interval_update
99 *
100 * @abstract
101 * Updates an already started interval workgroup to have the new
102 * deadline specified. This function is real time safe.
103 *
104 * This function will return an error in the following cases:
105 * - The current thread is not a member of the os_workgroup_interval_t
106 * - The os_workgroup_interval_t has been cancelled
107 * - The timestamp passed in is malformed
108 * - os_workgroup_interval_start() was not previously called on the
109 * os_workgroup_interval_t or was already matched with an
110 * os_workgroup_interval_finish()
111 * - A concurrent workgroup interval configuration operation is taking place
112 *
113 * @param deadline
114 * Timestamp specified in the os_clockid_t with
115 * which the os_workgroup_interval_t was created.
116 *
117 * @param data
118 * This field is currently unused and should be NULL
119 */
120API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
121OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT
122int
123os_workgroup_interval_update(os_workgroup_interval_t wg, uint64_t deadline,
124 os_workgroup_interval_data_t _Nullable data);
125
126/*!
127 * @function os_workgroup_interval_finish
128 *
129 * @abstract
130 * Indicates to the system that the member threads of
131 * this os_workgroup_interval_t have finished working on the current instance
132 * of the interval workload. This function is real time safe.
133 *
134 * This function will return an error in the following cases:
135 * - The current thread is not a member of the os_workgroup_interval_t
136 * - os_workgroup_interval_start() was not previously called on the
137 * os_workgroup_interval_t or was already matched with an
138 * os_workgroup_interval_finish()
139 * - A concurrent workgroup interval configuration operation is taking place.
140 *
141 * @param data
142 * This field is currently unused and should be NULL
143 *
144 */
145API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
146OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT
147int
148os_workgroup_interval_finish(os_workgroup_interval_t wg,
149 os_workgroup_interval_data_t _Nullable data);
150
151OS_WORKGROUP_ASSUME_NONNULL_END
152
153__END_DECLS
154
155#endif /* __OS_WORKGROUP_INTERVAL__ */
lib/libc/include/x86_64-macos-gnu/os/workgroup_object.h deleted-357
......@@ -1,357 +0,0 @@
1/*
2 * Copyright (c) 2020 Apple Inc. All rights reserved.
3 *
4 * @APPLE_APACHE_LICENSE_HEADER_START@
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * @APPLE_APACHE_LICENSE_HEADER_END@
19 */
20
21#ifndef __OS_WORKGROUP_OBJECT__
22#define __OS_WORKGROUP_OBJECT__
23
24#ifndef __OS_WORKGROUP_INDIRECT__
25#error "Please #include <os/workgroup.h> instead of this file directly."
26#include <os/workgroup_base.h> // For header doc
27#endif
28
29__BEGIN_DECLS
30
31OS_WORKGROUP_ASSUME_NONNULL_BEGIN
32
33/*!
34 * @typedef os_workgroup_t
35 *
36 * @abstract
37 * A reference counted os object representing a workload that needs to
38 * be distinctly recognized and tracked by the system. The workgroup
39 * tracks a collection of threads all working cooperatively. An os_workgroup
40 * object - when not an instance of a specific os_workgroup_t subclass -
41 * represents a generic workload and makes no assumptions about the kind of
42 * work done.
43 *
44 * @discussion
45 * Threads can explicitly join an os_workgroup_t to mark themselves as
46 * participants in the workload.
47 */
48OS_WORKGROUP_DECL(os_workgroup, WorkGroup);
49
50
51/* Attribute creation and specification */
52
53/*!
54 * @typedef os_workgroup_attr_t
55 *
56 * @abstract
57 * Pointer to an opaque structure for describing attributes that can be
58 * configured on a workgroup at creation.
59 */
60typedef struct os_workgroup_attr_opaque_s os_workgroup_attr_s;
61typedef struct os_workgroup_attr_opaque_s *os_workgroup_attr_t;
62
63/* os_workgroup_t attributes need to be initialized before use. This initializer
64 * allows you to create a workgroup with the system default attributes. */
65#define OS_WORKGROUP_ATTR_INITIALIZER_DEFAULT \
66 { .sig = _OS_WORKGROUP_ATTR_SIG_DEFAULT_INIT }
67
68
69
70/* The main use of the workgroup API is through instantiations of the concrete
71 * subclasses - please refer to os/workgroup_interval.h and
72 * os/workgroup_parallel.h for more information on creating workgroups.
73 *
74 * The functions below operate on all subclasses of os_workgroup_t.
75 */
76
77/*!
78 * @function os_workgroup_copy_port
79 *
80 * @abstract
81 * Returns a reference to a send right representing this workgroup that is to be
82 * sent to other processes. This port is to be passed to
83 * os_workgroup_create_with_port() to create a workgroup object.
84 *
85 * It is the client's responsibility to release the send right reference.
86 *
87 * If an error is encountered, errno is set and returned.
88 */
89API_AVAILABLE(macos(11.0))
90API_UNAVAILABLE(ios, tvos, watchos)
91OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT
92int
93os_workgroup_copy_port(os_workgroup_t wg, mach_port_t *mach_port_out);
94
95/*!
96 * @function os_workgroup_create_with_port
97 *
98 * @abstract
99 * Create an os_workgroup_t object from a send right returned by a previous
100 * call to os_workgroup_copy_port, potentially in a different process.
101 *
102 * A newly created os_workgroup_t has no initial member threads - in particular
103 * the creating thread does not join the os_workgroup_t implicitly.
104 *
105 * @param name
106 * A client specified string for labelling the workgroup. This parameter is
107 * optional and can be NULL.
108 *
109 * @param mach_port
110 * The send right to create the workgroup from. No reference is consumed
111 * on the specified send right.
112 */
113API_AVAILABLE(macos(11.0))
114API_UNAVAILABLE(ios, tvos, watchos)
115OS_SWIFT_NAME(WorkGroup.init(__name:port:)) OS_WORKGROUP_EXPORT OS_WORKGROUP_RETURNS_RETAINED
116os_workgroup_t _Nullable
117os_workgroup_create_with_port(const char *_Nullable name, mach_port_t mach_port);
118
119/*!
120 * @function os_workgroup_create_with_workgroup
121 *
122 * @abstract
123 * Create a new os_workgroup object from an existing os_workgroup.
124 *
125 * The newly created os_workgroup has no initial member threads - in particular
126 * the creating threaad does not join the os_workgroup_t implicitly.
127 *
128 * @param name
129 * A client specified string for labelling the workgroup. This parameter is
130 * optional and can be NULL.
131 *
132 * @param wg
133 * The existing workgroup to create a new workgroup object from.
134 */
135API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
136OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_RETURNS_RETAINED
137os_workgroup_t _Nullable
138os_workgroup_create_with_workgroup(const char * _Nullable name, os_workgroup_t wg);
139
140/*!
141 * @typedef os_workgroup_join_token, os_workgroup_join_token_t
142 *
143 * @abstract
144 * An opaque join token which the client needs to pass to os_workgroup_join
145 * and os_workgroup_leave
146 */
147OS_REFINED_FOR_SWIFT
148typedef struct os_workgroup_join_token_opaque_s os_workgroup_join_token_s;
149OS_REFINED_FOR_SWIFT
150typedef struct os_workgroup_join_token_opaque_s *os_workgroup_join_token_t;
151
152
153/*!
154 * @function os_workgroup_join
155 *
156 * @abstract
157 * Joins the current thread to the specified workgroup and populates the join
158 * token that has been passed in. This API is real-time safe.
159 *
160 * @param wg
161 * The workgroup that the current thread would like to join
162 *
163 * @param token_out
164 * Pointer to a client allocated struct which the function will populate
165 * with the join token. This token must be passed in by the thread when it calls
166 * os_workgroup_leave().
167 *
168 * Errors will be returned in the following cases:
169 *
170 * EALREADY The thread is already part of a workgroup that the specified
171 * workgroup does not nest with
172 * EINVAL The workgroup has been cancelled
173 */
174API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
175OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT
176int
177os_workgroup_join(os_workgroup_t wg, os_workgroup_join_token_t token_out);
178
179/*!
180 * @function os_workgroup_leave
181 *
182 * @abstract
183 * This removes the current thread from a workgroup it has previously
184 * joined. Threads must leave all workgroups in the reverse order that they
185 * have joined them. Failing to do so before exiting will result in undefined
186 * behavior.
187 *
188 * If the join token is malformed, the process will be aborted.
189 *
190 * This API is real time safe.
191 *
192 * @param wg
193 * The workgroup that the current thread would like to leave.
194 *
195 * @param token
196 * This is the join token populated by the most recent call to
197 * os_workgroup_join().
198 */
199API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
200OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT
201void
202os_workgroup_leave(os_workgroup_t wg, os_workgroup_join_token_t token);
203
204/* Working Arena index of a thread in a workgroup */
205typedef uint32_t os_workgroup_index;
206/* Destructor for Working Arena */
207typedef void (*os_workgroup_working_arena_destructor_t)(void * _Nullable);
208
209/*!
210 * @function os_workgroup_set_working_arena
211 *
212 * @abstract
213 * Associates a client defined working arena with the workgroup. The arena
214 * is local to the workgroup object in the process. This is intended for
215 * distributing a manually managed memory allocation between member threads
216 * of the workgroup.
217 *
218 * This function can be called multiple times and the client specified
219 * destructor will be called on the previously assigned arena, if any. This
220 * function can only be called when no threads have currently joined the
221 * workgroup and all workloops associated with the workgroup are idle.
222 *
223 * @param wg
224 * The workgroup to associate the working arena with
225 *
226 * @param arena
227 * The client managed arena to associate with the workgroup. This value can
228 * be NULL.
229 *
230 * @param max_workers
231 * The maximum number of threads that will ever query the workgroup for the
232 * arena and request an index into it. If the arena is not used to partition
233 * work amongst member threads, then this field can be 0.
234 *
235 * @param destructor
236 * A destructor to call on the previously assigned working arena, if any
237 */
238API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
239OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT
240int
241os_workgroup_set_working_arena(os_workgroup_t wg, void * _Nullable arena,
242 uint32_t max_workers, os_workgroup_working_arena_destructor_t destructor);
243
244/*!
245 * @function os_workgroup_get_working_arena
246 *
247 * @abstract
248 * Returns the working arena associated with the workgroup and the current
249 * thread's index in the workgroup. This function can only be called by a member
250 * of the workgroup. Multiple calls to this API by a member thread will return
251 * the same arena and index until the thread leaves the workgroup.
252 *
253 * For workloops with an associated workgroup, every work item on the workloop
254 * will receive the same index in the arena.
255 *
256 * This method returns NULL if no arena is set on the workgroup. The index
257 * returned by this function is zero-based and is namespaced per workgroup
258 * object in the process. The indices provided are strictly monotonic and never
259 * reused until a future call to os_workgroup_set_working_arena.
260 *
261 * @param wg
262 * The workgroup to get the working arena from.
263 *
264 * @param index_out
265 * A pointer to a os_workgroup_index which will be populated by the caller's
266 * index in the workgroup.
267 */
268API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
269OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT
270void * _Nullable
271os_workgroup_get_working_arena(os_workgroup_t wg,
272 os_workgroup_index * _Nullable index_out);
273
274/*!
275 * @function os_workgroup_cancel
276 *
277 * @abstract
278 * This API invalidates a workgroup and indicates to the system that the
279 * workload is no longer relevant to the caller.
280 *
281 * No new work should be initiated for a cancelled workgroup and
282 * work that is already underway should periodically check for
283 * cancellation with os_workgroup_testcancel and initiate cleanup if needed.
284 *
285 * Threads currently in the workgroup continue to be tracked together but no
286 * new threads may join this workgroup - the only possible operation allowed is
287 * to leave the workgroup. Other actions may have undefined behavior or
288 * otherwise fail.
289 *
290 * This API is idempotent. Cancellation is local to the workgroup object
291 * it is called on and does not affect other workgroups.
292 *
293 * @param wg
294 * The workgroup that that the thread would like to cancel
295 */
296API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
297OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT
298void
299os_workgroup_cancel(os_workgroup_t wg);
300
301/*!
302 * @function os_workgroup_testcancel
303 *
304 * @abstract
305 * Returns true if the workgroup object has been cancelled. See also
306 * os_workgroup_cancel
307 */
308API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
309OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT
310bool
311os_workgroup_testcancel(os_workgroup_t wg);
312
313/*!
314 * @typedef os_workgroup_max_parallel_threads_attr_t
315 *
316 * @abstract
317 * A pointer to a structure describing the set of properties of a workgroup to
318 * override with the explicitly specified values in the structure.
319 *
320 * See also os_workgroup_max_parallel_threads.
321 */
322OS_REFINED_FOR_SWIFT
323typedef struct os_workgroup_max_parallel_threads_attr_s os_workgroup_mpt_attr_s;
324OS_REFINED_FOR_SWIFT
325typedef struct os_workgroup_max_parallel_threads_attr_s *os_workgroup_mpt_attr_t;
326
327/*!
328 * @function os_workgroup_max_parallel_threads
329 *
330 * @abstract
331 * Returns the system's recommendation for maximum number of threads the client
332 * should make for a multi-threaded workload in a given workgroup.
333 *
334 * This API takes into consideration the current hardware the code is running on
335 * and the attributes of the workgroup. It does not take into consideration the
336 * current load of the system and therefore always provides the most optimal
337 * recommendation for the workload.
338 *
339 * @param wg
340 * The workgroup in which the multi-threaded workload will be performed in. The
341 * threads performing the multi-threaded workload are expected to join this
342 * workgroup.
343 *
344 * @param attr
345 * This value is currently unused and should be NULL.
346 */
347API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
348OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT
349int
350os_workgroup_max_parallel_threads(os_workgroup_t wg, os_workgroup_mpt_attr_t
351 _Nullable attr);
352
353OS_WORKGROUP_ASSUME_NONNULL_END
354
355__END_DECLS
356
357#endif /* __OS_WORKGROUP_OBJECT__ */
lib/libc/include/x86_64-macos-gnu/os/workgroup_parallel.h deleted-74
......@@ -1,74 +0,0 @@
1/*
2 * Copyright (c) 2020 Apple Inc. All rights reserved.
3 *
4 * @APPLE_APACHE_LICENSE_HEADER_START@
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * @APPLE_APACHE_LICENSE_HEADER_END@
19 */
20
21#ifndef __OS_WORKGROUP_PARALLEL__
22#define __OS_WORKGROUP_PARALLEL__
23
24#ifndef __OS_WORKGROUP_INDIRECT__
25#error "Please #include <os/workgroup.h> instead of this file directly."
26#include <os/workgroup_base.h> // For header doc
27#endif
28
29#include <os/workgroup_object.h>
30
31__BEGIN_DECLS
32
33OS_WORKGROUP_ASSUME_NONNULL_BEGIN
34
35/*!
36 * @typedef os_workgroup_parallel_t
37 *
38 * @abstract
39 * A subclass of an os_workgroup_t for tracking parallel work.
40 */
41OS_WORKGROUP_SUBCLASS_DECL_PROTO(os_workgroup_parallel, Parallelizable);
42OS_WORKGROUP_SUBCLASS_DECL(os_workgroup_parallel, os_workgroup, WorkGroupParallel);
43
44/*!
45 * @function os_workgroup_parallel_create
46 *
47 * @abstract
48 * Creates an os_workgroup_t which tracks a parallel workload.
49 * A newly created os_workgroup_interval_t has no initial member threads -
50 * in particular the creating thread does not join the os_workgroup_parallel_t
51 * implicitly.
52 *
53 * See also os_workgroup_max_parallel_threads().
54 *
55 * @param name
56 * A client specified string for labelling the workgroup. This parameter is
57 * optional and can be NULL.
58 *
59 * @param attr
60 * The requested set of workgroup attributes. NULL is to be specified for the
61 * default set of attributes.
62 */
63API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
64OS_WORKGROUP_EXPORT OS_WORKGROUP_RETURNS_RETAINED
65OS_SWIFT_NAME(WorkGroupParallel.init(__name:attr:))
66os_workgroup_parallel_t _Nullable
67os_workgroup_parallel_create(const char * _Nullable name,
68 os_workgroup_attr_t _Nullable attr);
69
70OS_WORKGROUP_ASSUME_NONNULL_END
71
72__END_DECLS
73
74#endif /* __OS_WORKGROUP_PARALLEL__ */
lib/libc/include/x86_64-macos-gnu/pthread.h+3-27
......@@ -53,6 +53,9 @@
5353#define _PTHREAD_H
5454
5555#include <_types.h>
56#ifndef __POSIX_LIB__
57#include <pthread/pthread_impl.h>
58#endif
5659#include <pthread/sched.h>
5760#include <time.h>
5861#include <sys/_pthread/_pthread_types.h>
......@@ -556,33 +559,6 @@ int pthread_sigmask(int, const sigset_t * _Nullable, sigset_t * _Nullable)
556559__API_AVAILABLE(macos(10.4), ios(2.0))
557560void pthread_yield_np(void);
558561
559__API_AVAILABLE(macos(11.0))
560__API_UNAVAILABLE(ios, tvos, watchos)
561void pthread_jit_write_protect_np(int enabled);
562
563__API_AVAILABLE(macos(11.0))
564__API_UNAVAILABLE(ios, tvos, watchos)
565int pthread_jit_write_protect_supported_np(void);
566
567/*!
568 * @function pthread_cpu_number_np
569 *
570 * @param cpu_number_out
571 * The CPU number that the thread was running on at the time of query.
572 * This cpu number is in the interval [0, ncpus) (from sysctlbyname("hw.ncpu"))
573 *
574 * @result
575 * This function returns 0 or the value of errno if an error occurred.
576 *
577 * @note
578 * Optimizations of per-CPU datastructures based on the result of this function
579 * still require synchronization since it is not guaranteed that the thread will
580 * still be on the same CPU by the time the function returns.
581 */
582__API_AVAILABLE(macos(11.0), ios(14.2), tvos(14.2), watchos(7.1))
583int
584pthread_cpu_number_np(size_t *cpu_number_out);
585
586562#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE || __cplusplus */
587563__END_DECLS
588564#if __has_feature(assume_nonnull)
lib/libc/include/x86_64-macos-gnu/pthread/sched.h+1-3
......@@ -25,7 +25,7 @@
2525#define _SCHED_H_
2626
2727#include <sys/cdefs.h>
28#include <pthread/pthread_impl.h>
28#include <pthread_impl.h>
2929
3030__BEGIN_DECLS
3131/*
......@@ -33,8 +33,6 @@ __BEGIN_DECLS
3333 */
3434#ifndef __POSIX_LIB__
3535struct sched_param { int sched_priority; char __opaque[__SCHED_PARAM_SIZE__]; };
36#else
37struct sched_param;
3836#endif
3937
4038extern int sched_yield(void);
lib/libc/include/x86_64-macos-gnu/pthread_impl.h created+66
......@@ -0,0 +1,66 @@
1/*
2 * Copyright (c) 2000-2003 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#ifndef _PTHREAD_IMPL_H_
25#define _PTHREAD_IMPL_H_
26/*
27 * Internal implementation details
28 */
29
30/* This whole header file will disappear, so don't depend on it... */
31
32#if __has_feature(assume_nonnull)
33_Pragma("clang assume_nonnull begin")
34#endif
35
36#ifndef __POSIX_LIB__
37
38/*
39 * [Internal] data structure signatures
40 */
41#define _PTHREAD_MUTEX_SIG_init 0x32AAABA7
42
43#define _PTHREAD_ERRORCHECK_MUTEX_SIG_init 0x32AAABA1
44#define _PTHREAD_RECURSIVE_MUTEX_SIG_init 0x32AAABA2
45#define _PTHREAD_FIRSTFIT_MUTEX_SIG_init 0x32AAABA3
46
47#define _PTHREAD_COND_SIG_init 0x3CB0B1BB
48#define _PTHREAD_ONCE_SIG_init 0x30B1BCBA
49#define _PTHREAD_RWLOCK_SIG_init 0x2DA8B3B4
50
51/*
52 * POSIX scheduling policies
53 */
54#define SCHED_OTHER 1
55#define SCHED_FIFO 4
56#define SCHED_RR 2
57
58#define __SCHED_PARAM_SIZE__ 4
59
60#endif /* __POSIX_LIB__ */
61
62#if __has_feature(assume_nonnull)
63_Pragma("clang assume_nonnull end")
64#endif
65
66#endif /* _PTHREAD_IMPL_H_ */
lib/libc/include/x86_64-macos-gnu/sched.h+1-3
......@@ -25,7 +25,7 @@
2525#define _SCHED_H_
2626
2727#include <sys/cdefs.h>
28#include <pthread/pthread_impl.h>
28#include <pthread_impl.h>
2929
3030__BEGIN_DECLS
3131/*
......@@ -33,8 +33,6 @@ __BEGIN_DECLS
3333 */
3434#ifndef __POSIX_LIB__
3535struct sched_param { int sched_priority; char __opaque[__SCHED_PARAM_SIZE__]; };
36#else
37struct sched_param;
3836#endif
3937
4038extern int sched_yield(void);
lib/libc/include/x86_64-macos-gnu/signal.h+5
......@@ -108,11 +108,16 @@ int sigvec(int, struct sigvec *, struct sigvec *);
108108__END_DECLS
109109
110110/* List definitions after function declarations, or Reiser cpp gets upset. */
111#if defined(__i386__) || defined(__x86_64__)
112/* The left shift operator on intel is modulo 32 */
111113__header_always_inline int
112114__sigbits(int __signo)
113115{
114116 return __signo > __DARWIN_NSIG ? 0 : (1 << (__signo - 1));
115117}
118#else /* !__i386__ && !__x86_64__ */
119#define __sigbits(signo) (1 << ((signo) - 1))
120#endif /* __i386__ || __x86_64__ */
116121
117122#define sigaddset(set, signo) (*(set) |= __sigbits(signo), 0)
118123#define sigdelset(set, signo) (*(set) &= ~__sigbits(signo), 0)
lib/libc/include/x86_64-macos-gnu/simd/common.h+18-18
......@@ -1977,7 +1977,7 @@ static inline SIMD_CFUNC simd_char16 simd_abs(simd_char16 x) {
19771977#if defined __arm__ || defined __arm64__
19781978 return vabsq_s8(x);
19791979#elif defined __SSE4_1__
1980 return (simd_char16) _mm_abs_epi8((__m128i)x);
1980 return _mm_abs_epi8(x);
19811981#else
19821982 simd_char16 mask = x >> 7; return (x ^ mask) - mask;
19831983#endif
......@@ -2019,7 +2019,7 @@ static inline SIMD_CFUNC simd_short8 simd_abs(simd_short8 x) {
20192019#if defined __arm__ || defined __arm64__
20202020 return vabsq_s16(x);
20212021#elif defined __SSE4_1__
2022 return (simd_short8) _mm_abs_epi16((__m128i)x);
2022 return _mm_abs_epi16(x);
20232023#else
20242024 simd_short8 mask = x >> 15; return (x ^ mask) - mask;
20252025#endif
......@@ -2057,7 +2057,7 @@ static inline SIMD_CFUNC simd_int4 simd_abs(simd_int4 x) {
20572057#if defined __arm__ || defined __arm64__
20582058 return vabsq_s32(x);
20592059#elif defined __SSE4_1__
2060 return (simd_int4) _mm_abs_epi32((__m128i)x);
2060 return _mm_abs_epi32(x);
20612061#else
20622062 simd_int4 mask = x >> 31; return (x ^ mask) - mask;
20632063#endif
......@@ -2103,7 +2103,7 @@ static inline SIMD_CFUNC simd_long2 simd_abs(simd_long2 x) {
21032103#if defined __arm64__
21042104 return vabsq_s64(x);
21052105#elif defined __SSE4_1__
2106 return (simd_long2) _mm_abs_epi64((__m128i)x);
2106 return _mm_abs_epi64(x);
21072107#else
21082108 simd_long2 mask = x >> 63; return (x ^ mask) - mask;
21092109#endif
......@@ -2170,7 +2170,7 @@ static inline SIMD_CFUNC simd_char16 simd_min(simd_char16 x, simd_char16 y) {
21702170#if defined __arm__ || defined __arm64__
21712171 return vminq_s8(x, y);
21722172#elif defined __SSE4_1__
2173 return (simd_char16) _mm_min_epi8((__m128i)x, (__m128i)y);
2173 return _mm_min_epi8(x, y);
21742174#else
21752175 return simd_bitselect(x, y, y < x);
21762176#endif
......@@ -2217,7 +2217,7 @@ static inline SIMD_CFUNC simd_uchar16 simd_min(simd_uchar16 x, simd_uchar16 y) {
22172217#if defined __arm__ || defined __arm64__
22182218 return vminq_u8(x, y);
22192219#elif defined __SSE4_1__
2220 return (simd_uchar16) _mm_min_epu8((__m128i)x, (__m128i)y);
2220 return _mm_min_epu8(x, y);
22212221#else
22222222 return simd_bitselect(x, y, y < x);
22232223#endif
......@@ -2260,7 +2260,7 @@ static inline SIMD_CFUNC simd_short8 simd_min(simd_short8 x, simd_short8 y) {
22602260#if defined __arm__ || defined __arm64__
22612261 return vminq_s16(x, y);
22622262#elif defined __SSE4_1__
2263 return (simd_short8) _mm_min_epi16((__m128i)x, (__m128i)y);
2263 return _mm_min_epi16(x, y);
22642264#else
22652265 return simd_bitselect(x, y, y < x);
22662266#endif
......@@ -2303,7 +2303,7 @@ static inline SIMD_CFUNC simd_ushort8 simd_min(simd_ushort8 x, simd_ushort8 y) {
23032303#if defined __arm__ || defined __arm64__
23042304 return vminq_u16(x, y);
23052305#elif defined __SSE4_1__
2306 return (simd_ushort8) _mm_min_epu16((__m128i)x, (__m128i)y);
2306 return _mm_min_epu16(x, y);
23072307#else
23082308 return simd_bitselect(x, y, y < x);
23092309#endif
......@@ -2342,7 +2342,7 @@ static inline SIMD_CFUNC simd_int4 simd_min(simd_int4 x, simd_int4 y) {
23422342#if defined __arm__ || defined __arm64__
23432343 return vminq_s32(x, y);
23442344#elif defined __SSE4_1__
2345 return (simd_int4) _mm_min_epi32((__m128i)x, (__m128i)y);
2345 return _mm_min_epi32(x, y);
23462346#else
23472347 return simd_bitselect(x, y, y < x);
23482348#endif
......@@ -2381,7 +2381,7 @@ static inline SIMD_CFUNC simd_uint4 simd_min(simd_uint4 x, simd_uint4 y) {
23812381#if defined __arm__ || defined __arm64__
23822382 return vminq_u32(x, y);
23832383#elif defined __SSE4_1__
2384 return (simd_uint4) _mm_min_epu32((__m128i)x, (__m128i)y);
2384 return _mm_min_epu32(x, y);
23852385#else
23862386 return simd_bitselect(x, y, y < x);
23872387#endif
......@@ -2528,7 +2528,7 @@ static inline SIMD_CFUNC simd_char16 simd_max(simd_char16 x, simd_char16 y) {
25282528#if defined __arm__ || defined __arm64__
25292529 return vmaxq_s8(x, y);
25302530#elif defined __SSE4_1__
2531 return (simd_char16) _mm_max_epi8((__m128i)x, (__m128i)y);
2531 return _mm_max_epi8(x, y);
25322532#else
25332533 return simd_bitselect(x, y, x < y);
25342534#endif
......@@ -2575,7 +2575,7 @@ static inline SIMD_CFUNC simd_uchar16 simd_max(simd_uchar16 x, simd_uchar16 y) {
25752575#if defined __arm__ || defined __arm64__
25762576 return vmaxq_u8(x, y);
25772577#elif defined __SSE4_1__
2578 return (simd_uchar16) _mm_max_epu8((__m128i)x, (__m128i)y);
2578 return _mm_max_epu8(x, y);
25792579#else
25802580 return simd_bitselect(x, y, x < y);
25812581#endif
......@@ -2618,7 +2618,7 @@ static inline SIMD_CFUNC simd_short8 simd_max(simd_short8 x, simd_short8 y) {
26182618#if defined __arm__ || defined __arm64__
26192619 return vmaxq_s16(x, y);
26202620#elif defined __SSE4_1__
2621 return (simd_short8) _mm_max_epi16((__m128i)x, (__m128i)y);
2621 return _mm_max_epi16(x, y);
26222622#else
26232623 return simd_bitselect(x, y, x < y);
26242624#endif
......@@ -2661,7 +2661,7 @@ static inline SIMD_CFUNC simd_ushort8 simd_max(simd_ushort8 x, simd_ushort8 y) {
26612661#if defined __arm__ || defined __arm64__
26622662 return vmaxq_u16(x, y);
26632663#elif defined __SSE4_1__
2664 return (simd_ushort8) _mm_max_epu16((__m128i)x, (__m128i)y);
2664 return _mm_max_epu16(x, y);
26652665#else
26662666 return simd_bitselect(x, y, x < y);
26672667#endif
......@@ -2700,7 +2700,7 @@ static inline SIMD_CFUNC simd_int4 simd_max(simd_int4 x, simd_int4 y) {
27002700#if defined __arm__ || defined __arm64__
27012701 return vmaxq_s32(x, y);
27022702#elif defined __SSE4_1__
2703 return (simd_int4) _mm_max_epi32((__m128i)x, (__m128i)y);
2703 return _mm_max_epi32(x, y);
27042704#else
27052705 return simd_bitselect(x, y, x < y);
27062706#endif
......@@ -2739,7 +2739,7 @@ static inline SIMD_CFUNC simd_uint4 simd_max(simd_uint4 x, simd_uint4 y) {
27392739#if defined __arm__ || defined __arm64__
27402740 return vmaxq_u32(x, y);
27412741#elif defined __SSE4_1__
2742 return (simd_uint4) _mm_max_epu32((__m128i)x, (__m128i)y);
2742 return _mm_max_epu32(x, y);
27432743#else
27442744 return simd_bitselect(x, y, x < y);
27452745#endif
......@@ -3083,7 +3083,7 @@ static inline SIMD_CFUNC simd_double8 simd_clamp(simd_double8 x, simd_double8 mi
30833083
30843084
30853085static inline SIMD_CFUNC float simd_sign(float x) {
3086 return (x == 0 | x != x) ? 0 : copysign(1,x);
3086 return x == 0 | x != x ? 0 : copysign(1,x);
30873087}
30883088
30893089static inline SIMD_CFUNC simd_float2 simd_sign(simd_float2 x) {
......@@ -3107,7 +3107,7 @@ static inline SIMD_CFUNC simd_float16 simd_sign(simd_float16 x) {
31073107}
31083108
31093109static inline SIMD_CFUNC double simd_sign(double x) {
3110 return (x == 0 | x != x) ? 0 : copysign(1,x);
3110 return x == 0 | x != x ? 0 : copysign(1,x);
31113111}
31123112
31133113static inline SIMD_CFUNC simd_double2 simd_sign(simd_double2 x) {
lib/libc/include/x86_64-macos-gnu/simd/conversion.h-91
......@@ -559,11 +559,6 @@ static simd_int2 SIMD_CFUNC simd_int_sat(simd_ulong2 __x);
559559static simd_int3 SIMD_CFUNC simd_int_sat(simd_ulong3 __x);
560560static simd_int4 SIMD_CFUNC simd_int_sat(simd_ulong4 __x);
561561static simd_int8 SIMD_CFUNC simd_int_sat(simd_ulong8 __x);
562static simd_int2 SIMD_CFUNC simd_int_rte(simd_float2 __x);
563static simd_int3 SIMD_CFUNC simd_int_rte(simd_float3 __x);
564static simd_int4 SIMD_CFUNC simd_int_rte(simd_float4 __x);
565static simd_int8 SIMD_CFUNC simd_int_rte(simd_float8 __x);
566static simd_int16 SIMD_CFUNC simd_int_rte(simd_float16 __x);
567562#define vector_int simd_int
568563#define vector_int_sat simd_int_sat
569564
......@@ -793,10 +788,6 @@ static simd_long2 SIMD_CFUNC simd_long_sat(simd_ulong2 __x);
793788static simd_long3 SIMD_CFUNC simd_long_sat(simd_ulong3 __x);
794789static simd_long4 SIMD_CFUNC simd_long_sat(simd_ulong4 __x);
795790static simd_long8 SIMD_CFUNC simd_long_sat(simd_ulong8 __x);
796static simd_long2 SIMD_CFUNC simd_long_rte(simd_double2 __x);
797static simd_long3 SIMD_CFUNC simd_long_rte(simd_double3 __x);
798static simd_long4 SIMD_CFUNC simd_long_rte(simd_double4 __x);
799static simd_long8 SIMD_CFUNC simd_long_rte(simd_double8 __x);
800791#define vector_long simd_long
801792#define vector_long_sat simd_long_sat
802793
......@@ -1120,7 +1111,6 @@ static simd_char2 SIMD_CFUNC simd_char_sat(simd_ulong2 __x) { return simd_cha
11201111static simd_char3 SIMD_CFUNC simd_char_sat(simd_ulong3 __x) { return simd_char(simd_min(__x,0x7f)); }
11211112static simd_char4 SIMD_CFUNC simd_char_sat(simd_ulong4 __x) { return simd_char(simd_min(__x,0x7f)); }
11221113static simd_char8 SIMD_CFUNC simd_char_sat(simd_ulong8 __x) { return simd_char(simd_min(__x,0x7f)); }
1123
11241114
11251115static simd_uchar2 SIMD_CFUNC simd_uchar(simd_char2 __x) { return (simd_uchar2)__x; }
11261116static simd_uchar3 SIMD_CFUNC simd_uchar(simd_char3 __x) { return (simd_uchar3)__x; }
......@@ -1225,7 +1215,6 @@ static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ulong2 __x) { return simd_u
12251215static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ulong3 __x) { return simd_uchar(simd_min(__x,0xff)); }
12261216static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ulong4 __x) { return simd_uchar(simd_min(__x,0xff)); }
12271217static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ulong8 __x) { return simd_uchar(simd_min(__x,0xff)); }
1228
12291218
12301219static simd_short2 SIMD_CFUNC simd_short(simd_char2 __x) { return __builtin_convertvector(__x, simd_short2); }
12311220static simd_short3 SIMD_CFUNC simd_short(simd_char3 __x) { return __builtin_convertvector(__x, simd_short3); }
......@@ -1330,7 +1319,6 @@ static simd_short2 SIMD_CFUNC simd_short_sat(simd_ulong2 __x) { return simd_s
13301319static simd_short3 SIMD_CFUNC simd_short_sat(simd_ulong3 __x) { return simd_short(simd_min(__x,0x7fff)); }
13311320static simd_short4 SIMD_CFUNC simd_short_sat(simd_ulong4 __x) { return simd_short(simd_min(__x,0x7fff)); }
13321321static simd_short8 SIMD_CFUNC simd_short_sat(simd_ulong8 __x) { return simd_short(simd_min(__x,0x7fff)); }
1333
13341322
13351323static simd_ushort2 SIMD_CFUNC simd_ushort(simd_char2 __x) { return simd_ushort(simd_short(__x)); }
13361324static simd_ushort3 SIMD_CFUNC simd_ushort(simd_char3 __x) { return simd_ushort(simd_short(__x)); }
......@@ -1435,7 +1423,6 @@ static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ulong2 __x) { return simd
14351423static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ulong3 __x) { return simd_ushort(simd_min(__x, 0xffff)); }
14361424static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ulong4 __x) { return simd_ushort(simd_min(__x, 0xffff)); }
14371425static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ulong8 __x) { return simd_ushort(simd_min(__x, 0xffff)); }
1438
14391426
14401427static simd_int2 SIMD_CFUNC simd_int(simd_char2 __x) { return __builtin_convertvector(__x, simd_int2); }
14411428static simd_int3 SIMD_CFUNC simd_int(simd_char3 __x) { return __builtin_convertvector(__x, simd_int3); }
......@@ -1532,46 +1519,6 @@ static simd_int2 SIMD_CFUNC simd_int_sat(simd_ulong2 __x) { return simd_int(s
15321519static simd_int3 SIMD_CFUNC simd_int_sat(simd_ulong3 __x) { return simd_int(simd_min(__x,0x7fffffff)); }
15331520static simd_int4 SIMD_CFUNC simd_int_sat(simd_ulong4 __x) { return simd_int(simd_min(__x,0x7fffffff)); }
15341521static simd_int8 SIMD_CFUNC simd_int_sat(simd_ulong8 __x) { return simd_int(simd_min(__x,0x7fffffff)); }
1535
1536static simd_int2 SIMD_CFUNC simd_int_rte(simd_float2 __x) {
1537#if defined __arm64__
1538 return vcvtn_s32_f32(__x);
1539#else
1540 return simd_make_int2(simd_int_rte(simd_make_float4_undef(__x)));
1541#endif
1542}
1543
1544static simd_int3 SIMD_CFUNC simd_int_rte(simd_float3 __x) {
1545 return simd_make_int3(simd_int_rte(simd_make_float4_undef(__x)));
1546}
1547
1548static simd_int4 SIMD_CFUNC simd_int_rte(simd_float4 __x) {
1549#if defined __SSE2__
1550 return _mm_cvtps_epi32(__x);
1551#elif defined __arm64__
1552 return vcvtnq_s32_f32(__x);
1553#else
1554 simd_float4 magic = __tg_copysign(0x1.0p23, __x);
1555 simd_int4 x_is_small = __tg_fabs(__x) < 0x1.0p23;
1556 return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fffffff), simd_int4);
1557#endif
1558}
1559
1560static simd_int8 SIMD_CFUNC simd_int_rte(simd_float8 __x) {
1561#if defined __AVX__
1562 return _mm256_cvtps_epi32(__x);
1563#else
1564 return simd_make_int8(simd_int_rte(__x.lo), simd_int_rte(__x.hi));
1565#endif
1566}
1567
1568static simd_int16 SIMD_CFUNC simd_int_rte(simd_float16 __x) {
1569#if defined __AVX512F__
1570 return _mm512_cvt_roundps_epi32(__x, _MM_FROUND_RINT);
1571#else
1572 return simd_make_int16(simd_int_rte(__x.lo), simd_int_rte(__x.hi));
1573#endif
1574}
15751522
15761523static simd_uint2 SIMD_CFUNC simd_uint(simd_char2 __x) { return simd_uint(simd_int(__x)); }
15771524static simd_uint3 SIMD_CFUNC simd_uint(simd_char3 __x) { return simd_uint(simd_int(__x)); }
......@@ -1668,7 +1615,6 @@ static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ulong2 __x) { return simd_uin
16681615static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ulong3 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
16691616static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ulong4 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
16701617static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ulong8 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
1671
16721618
16731619static simd_float2 SIMD_CFUNC simd_float(simd_char2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
16741620static simd_float3 SIMD_CFUNC simd_float(simd_char3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
......@@ -1717,7 +1663,6 @@ static simd_float2 SIMD_CFUNC simd_float(simd_double2 __x) { return __builtin_
17171663static simd_float3 SIMD_CFUNC simd_float(simd_double3 __x) { return __builtin_convertvector(__x,simd_float3); }
17181664static simd_float4 SIMD_CFUNC simd_float(simd_double4 __x) { return __builtin_convertvector(__x,simd_float4); }
17191665static simd_float8 SIMD_CFUNC simd_float(simd_double8 __x) { return __builtin_convertvector(__x,simd_float8); }
1720
17211666
17221667static simd_long2 SIMD_CFUNC simd_long(simd_char2 __x) { return __builtin_convertvector(__x,simd_long2); }
17231668static simd_long3 SIMD_CFUNC simd_long(simd_char3 __x) { return __builtin_convertvector(__x,simd_long3); }
......@@ -1800,39 +1745,6 @@ static simd_long2 SIMD_CFUNC simd_long_sat(simd_ulong2 __x) { return simd_lon
18001745static simd_long3 SIMD_CFUNC simd_long_sat(simd_ulong3 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); }
18011746static simd_long4 SIMD_CFUNC simd_long_sat(simd_ulong4 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); }
18021747static simd_long8 SIMD_CFUNC simd_long_sat(simd_ulong8 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); }
1803
1804static simd_long2 SIMD_CFUNC simd_long_rte(simd_double2 __x) {
1805#if defined __AVX512F__
1806 return _mm_cvtpd_epi64(__x);
1807#elif defined __arm64__
1808 return vcvtnq_s64_f64(__x);
1809#else
1810 simd_double2 magic = __tg_copysign(0x1.0p52, __x);
1811 simd_long2 x_is_small = __tg_fabs(__x) < 0x1.0p52;
1812 return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fffffffffffffff), simd_long2);
1813#endif
1814}
1815
1816static simd_long3 SIMD_CFUNC simd_long_rte(simd_double3 __x) {
1817 return simd_make_long3(simd_long_rte(simd_make_double4_undef(__x)));
1818}
1819
1820static simd_long4 SIMD_CFUNC simd_long_rte(simd_double4 __x) {
1821#if defined __AVX512F__
1822 return _mm256_cvtpd_epi64(__x);
1823#else
1824 return simd_make_long4(simd_long_rte(__x.lo), simd_long_rte(__x.hi));
1825#endif
1826}
1827
1828static simd_long8 SIMD_CFUNC simd_long_rte(simd_double8 __x) {
1829#if defined __AVX512F__
1830 return _mm512_cvt_roundpd_epi64(__x, _MM_FROUND_RINT);
1831#else
1832 return simd_make_long8(simd_long_rte(__x.lo), simd_long_rte(__x.hi));
1833#endif
1834}
1835
18361748
18371749static simd_ulong2 SIMD_CFUNC simd_ulong(simd_char2 __x) { return simd_ulong(simd_long(__x)); }
18381750static simd_ulong3 SIMD_CFUNC simd_ulong(simd_char3 __x) { return simd_ulong(simd_long(__x)); }
......@@ -1915,7 +1827,6 @@ static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ulong2 __x) { return __x; }
19151827static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ulong3 __x) { return __x; }
19161828static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ulong4 __x) { return __x; }
19171829static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ulong8 __x) { return __x; }
1918
19191830
19201831static simd_double2 SIMD_CFUNC simd_double(simd_char2 __x) { return simd_double(simd_int(__x)); }
19211832static simd_double3 SIMD_CFUNC simd_double(simd_char3 __x) { return simd_double(simd_int(__x)); }
......@@ -1957,11 +1868,9 @@ static simd_double2 SIMD_CFUNC simd_double(simd_double2 __x) { return __builti
19571868static simd_double3 SIMD_CFUNC simd_double(simd_double3 __x) { return __builtin_convertvector(__x, simd_double3); }
19581869static simd_double4 SIMD_CFUNC simd_double(simd_double4 __x) { return __builtin_convertvector(__x, simd_double4); }
19591870static simd_double8 SIMD_CFUNC simd_double(simd_double8 __x) { return __builtin_convertvector(__x, simd_double8); }
1960
19611871
19621872#ifdef __cplusplus
19631873}
19641874#endif
19651875#endif // SIMD_COMPILER_HAS_REQUIRED_FEATURES
19661876#endif // __SIMD_CONVERSION_HEADER__
1967
lib/libc/include/x86_64-macos-gnu/simd/logic.h+28-28
......@@ -628,7 +628,7 @@ extern "C" {
628628
629629static inline SIMD_CFUNC simd_bool simd_any(simd_char2 x) {
630630#if defined __SSE2__
631 return (_mm_movemask_epi8((__m128i)simd_make_char16_undef(x)) & 0x3);
631 return (_mm_movemask_epi8(simd_make_char16_undef(x)) & 0x3);
632632#elif defined __arm64__
633633 return simd_any(x.xyxy);
634634#else
......@@ -638,7 +638,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_char2 x) {
638638}
639639static inline SIMD_CFUNC simd_bool simd_any(simd_char3 x) {
640640#if defined __SSE2__
641 return (_mm_movemask_epi8((__m128i)simd_make_char16_undef(x)) & 0x7);
641 return (_mm_movemask_epi8(simd_make_char16_undef(x)) & 0x7);
642642#elif defined __arm64__
643643 return simd_any(x.xyzz);
644644#else
......@@ -648,7 +648,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_char3 x) {
648648}
649649static inline SIMD_CFUNC simd_bool simd_any(simd_char4 x) {
650650#if defined __SSE2__
651 return (_mm_movemask_epi8((__m128i)simd_make_char16_undef(x)) & 0xf);
651 return (_mm_movemask_epi8(simd_make_char16_undef(x)) & 0xf);
652652#elif defined __arm64__
653653 return simd_any(x.xyzwxyzw);
654654#else
......@@ -658,7 +658,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_char4 x) {
658658}
659659static inline SIMD_CFUNC simd_bool simd_any(simd_char8 x) {
660660#if defined __SSE2__
661 return (_mm_movemask_epi8((__m128i)simd_make_char16_undef(x)) & 0xff);
661 return (_mm_movemask_epi8(simd_make_char16_undef(x)) & 0xff);
662662#elif defined __arm64__
663663 return vmaxv_u8(x) & 0x80;
664664#else
......@@ -668,7 +668,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_char8 x) {
668668}
669669static inline SIMD_CFUNC simd_bool simd_any(simd_char16 x) {
670670#if defined __SSE2__
671 return _mm_movemask_epi8((__m128i)x);
671 return _mm_movemask_epi8(x);
672672#elif defined __arm64__
673673 return vmaxvq_u8(x) & 0x80;
674674#else
......@@ -708,7 +708,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_uchar64 x) {
708708}
709709static inline SIMD_CFUNC simd_bool simd_any(simd_short2 x) {
710710#if defined __SSE2__
711 return (_mm_movemask_epi8((__m128i)simd_make_short8_undef(x)) & 0xa);
711 return (_mm_movemask_epi8(simd_make_short8_undef(x)) & 0xa);
712712#elif defined __arm64__
713713 return simd_any(x.xyxy);
714714#else
......@@ -718,7 +718,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_short2 x) {
718718}
719719static inline SIMD_CFUNC simd_bool simd_any(simd_short3 x) {
720720#if defined __SSE2__
721 return (_mm_movemask_epi8((__m128i)simd_make_short8_undef(x)) & 0x2a);
721 return (_mm_movemask_epi8(simd_make_short8_undef(x)) & 0x2a);
722722#elif defined __arm64__
723723 return simd_any(x.xyzz);
724724#else
......@@ -728,7 +728,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_short3 x) {
728728}
729729static inline SIMD_CFUNC simd_bool simd_any(simd_short4 x) {
730730#if defined __SSE2__
731 return (_mm_movemask_epi8((__m128i)simd_make_short8_undef(x)) & 0xaa);
731 return (_mm_movemask_epi8(simd_make_short8_undef(x)) & 0xaa);
732732#elif defined __arm64__
733733 return vmaxv_u16(x) & 0x8000;
734734#else
......@@ -738,7 +738,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_short4 x) {
738738}
739739static inline SIMD_CFUNC simd_bool simd_any(simd_short8 x) {
740740#if defined __SSE2__
741 return (_mm_movemask_epi8((__m128i)x) & 0xaaaa);
741 return (_mm_movemask_epi8(x) & 0xaaaa);
742742#elif defined __arm64__
743743 return vmaxvq_u16(x) & 0x8000;
744744#else
......@@ -775,7 +775,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_ushort32 x) {
775775}
776776static inline SIMD_CFUNC simd_bool simd_any(simd_int2 x) {
777777#if defined __SSE2__
778 return (_mm_movemask_ps((__m128)simd_make_int4_undef(x)) & 0x3);
778 return (_mm_movemask_ps(simd_make_int4_undef(x)) & 0x3);
779779#elif defined __arm64__
780780 return vmaxv_u32(x) & 0x80000000;
781781#else
......@@ -785,7 +785,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_int2 x) {
785785}
786786static inline SIMD_CFUNC simd_bool simd_any(simd_int3 x) {
787787#if defined __SSE2__
788 return (_mm_movemask_ps((__m128)simd_make_int4_undef(x)) & 0x7);
788 return (_mm_movemask_ps(simd_make_int4_undef(x)) & 0x7);
789789#elif defined __arm64__
790790 return simd_any(x.xyzz);
791791#else
......@@ -794,7 +794,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_int3 x) {
794794}
795795static inline SIMD_CFUNC simd_bool simd_any(simd_int4 x) {
796796#if defined __SSE2__
797 return _mm_movemask_ps((__m128)x);
797 return _mm_movemask_ps(x);
798798#elif defined __arm64__
799799 return vmaxvq_u32(x) & 0x80000000;
800800#else
......@@ -828,7 +828,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_uint16 x) {
828828}
829829static inline SIMD_CFUNC simd_bool simd_any(simd_long2 x) {
830830#if defined __SSE2__
831 return _mm_movemask_pd((__m128d)x);
831 return _mm_movemask_pd(x);
832832#elif defined __arm64__
833833 return (x.x | x.y) & 0x8000000000000000U;
834834#else
......@@ -867,7 +867,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_ulong8 x) {
867867
868868static inline SIMD_CFUNC simd_bool simd_all(simd_char2 x) {
869869#if defined __SSE2__
870 return (_mm_movemask_epi8((__m128i)simd_make_char16_undef(x)) & 0x3) == 0x3;
870 return (_mm_movemask_epi8(simd_make_char16_undef(x)) & 0x3) == 0x3;
871871#elif defined __arm64__
872872 return simd_all(x.xyxy);
873873#else
......@@ -877,7 +877,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_char2 x) {
877877}
878878static inline SIMD_CFUNC simd_bool simd_all(simd_char3 x) {
879879#if defined __SSE2__
880 return (_mm_movemask_epi8((__m128i)simd_make_char16_undef(x)) & 0x7) == 0x7;
880 return (_mm_movemask_epi8(simd_make_char16_undef(x)) & 0x7) == 0x7;
881881#elif defined __arm64__
882882 return simd_all(x.xyzz);
883883#else
......@@ -887,7 +887,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_char3 x) {
887887}
888888static inline SIMD_CFUNC simd_bool simd_all(simd_char4 x) {
889889#if defined __SSE2__
890 return (_mm_movemask_epi8((__m128i)simd_make_char16_undef(x)) & 0xf) == 0xf;
890 return (_mm_movemask_epi8(simd_make_char16_undef(x)) & 0xf) == 0xf;
891891#elif defined __arm64__
892892 return simd_all(x.xyzwxyzw);
893893#else
......@@ -897,7 +897,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_char4 x) {
897897}
898898static inline SIMD_CFUNC simd_bool simd_all(simd_char8 x) {
899899#if defined __SSE2__
900 return (_mm_movemask_epi8((__m128i)simd_make_char16_undef(x)) & 0xff) == 0xff;
900 return (_mm_movemask_epi8(simd_make_char16_undef(x)) & 0xff) == 0xff;
901901#elif defined __arm64__
902902 return vminv_u8(x) & 0x80;
903903#else
......@@ -907,7 +907,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_char8 x) {
907907}
908908static inline SIMD_CFUNC simd_bool simd_all(simd_char16 x) {
909909#if defined __SSE2__
910 return _mm_movemask_epi8((__m128i)x) == 0xffff;
910 return _mm_movemask_epi8(x) == 0xffff;
911911#elif defined __arm64__
912912 return vminvq_u8(x) & 0x80;
913913#else
......@@ -947,7 +947,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_uchar64 x) {
947947}
948948static inline SIMD_CFUNC simd_bool simd_all(simd_short2 x) {
949949#if defined __SSE2__
950 return (_mm_movemask_epi8((__m128i)simd_make_short8_undef(x)) & 0xa) == 0xa;
950 return (_mm_movemask_epi8(simd_make_short8_undef(x)) & 0xa) == 0xa;
951951#elif defined __arm64__
952952 return simd_all(x.xyxy);
953953#else
......@@ -957,7 +957,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_short2 x) {
957957}
958958static inline SIMD_CFUNC simd_bool simd_all(simd_short3 x) {
959959#if defined __SSE2__
960 return (_mm_movemask_epi8((__m128i)simd_make_short8_undef(x)) & 0x2a) == 0x2a;
960 return (_mm_movemask_epi8(simd_make_short8_undef(x)) & 0x2a) == 0x2a;
961961#elif defined __arm64__
962962 return simd_all(x.xyzz);
963963#else
......@@ -967,7 +967,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_short3 x) {
967967}
968968static inline SIMD_CFUNC simd_bool simd_all(simd_short4 x) {
969969#if defined __SSE2__
970 return (_mm_movemask_epi8((__m128i)simd_make_short8_undef(x)) & 0xaa) == 0xaa;
970 return (_mm_movemask_epi8(simd_make_short8_undef(x)) & 0xaa) == 0xaa;
971971#elif defined __arm64__
972972 return vminv_u16(x) & 0x8000;
973973#else
......@@ -977,7 +977,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_short4 x) {
977977}
978978static inline SIMD_CFUNC simd_bool simd_all(simd_short8 x) {
979979#if defined __SSE2__
980 return (_mm_movemask_epi8((__m128i)x) & 0xaaaa) == 0xaaaa;
980 return (_mm_movemask_epi8(x) & 0xaaaa) == 0xaaaa;
981981#elif defined __arm64__
982982 return vminvq_u16(x) & 0x8000;
983983#else
......@@ -1014,7 +1014,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_ushort32 x) {
10141014}
10151015static inline SIMD_CFUNC simd_bool simd_all(simd_int2 x) {
10161016#if defined __SSE2__
1017 return (_mm_movemask_ps((__m128)simd_make_int4_undef(x)) & 0x3) == 0x3;
1017 return (_mm_movemask_ps(simd_make_int4_undef(x)) & 0x3) == 0x3;
10181018#elif defined __arm64__
10191019 return vminv_u32(x) & 0x80000000;
10201020#else
......@@ -1024,7 +1024,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_int2 x) {
10241024}
10251025static inline SIMD_CFUNC simd_bool simd_all(simd_int3 x) {
10261026#if defined __SSE2__
1027 return (_mm_movemask_ps((__m128)simd_make_int4_undef(x)) & 0x7) == 0x7;
1027 return (_mm_movemask_ps(simd_make_int4_undef(x)) & 0x7) == 0x7;
10281028#elif defined __arm64__
10291029 return simd_all(x.xyzz);
10301030#else
......@@ -1033,7 +1033,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_int3 x) {
10331033}
10341034static inline SIMD_CFUNC simd_bool simd_all(simd_int4 x) {
10351035#if defined __SSE2__
1036 return _mm_movemask_ps((__m128)x) == 0xf;
1036 return _mm_movemask_ps(x) == 0xf;
10371037#elif defined __arm64__
10381038 return vminvq_u32(x) & 0x80000000;
10391039#else
......@@ -1067,7 +1067,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_uint16 x) {
10671067}
10681068static inline SIMD_CFUNC simd_bool simd_all(simd_long2 x) {
10691069#if defined __SSE2__
1070 return _mm_movemask_pd((__m128d)x) == 0x3;
1070 return _mm_movemask_pd(x) == 0x3;
10711071#elif defined __arm64__
10721072 return (x.x & x.y) & 0x8000000000000000U;
10731073#else
......@@ -1112,7 +1112,7 @@ static inline SIMD_CFUNC simd_float3 simd_select(simd_float3 x, simd_float3 y, s
11121112}
11131113static inline SIMD_CFUNC simd_float4 simd_select(simd_float4 x, simd_float4 y, simd_int4 mask) {
11141114#if defined __SSE4_1__
1115 return _mm_blendv_ps(x, y, (__m128)mask);
1115 return _mm_blendv_ps(x, y, mask);
11161116#else
11171117 return simd_bitselect(x, y, mask >> 31);
11181118#endif
......@@ -1129,7 +1129,7 @@ static inline SIMD_CFUNC simd_float16 simd_select(simd_float16 x, simd_float16 y
11291129}
11301130static inline SIMD_CFUNC simd_double2 simd_select(simd_double2 x, simd_double2 y, simd_long2 mask) {
11311131#if defined __SSE4_1__
1132 return _mm_blendv_pd(x, y, (__m128d)mask);
1132 return _mm_blendv_pd(x, y, mask);
11331133#else
11341134 return simd_bitselect(x, y, mask >> 63);
11351135#endif
lib/libc/include/x86_64-macos-gnu/simd/math.h+160-161
......@@ -1886,7 +1886,6 @@ static inline SIMD_CFUNC double __tg_exp10(double x) { return __exp10(x); }
18861886 * and doubles as provided by `<simd/simd.h>`. */
18871887#define exp10(__x) __tg_exp10(__tg_promote1((__x))(__x))
18881888#endif
1889
18901889
18911890#endif /* !__cplusplus */
18921891
......@@ -1947,11 +1946,11 @@ static SIMD_CFUNC simd_float8 __tg_fmin(simd_float8 x, simd_float8 y) {
19471946}
19481947
19491948static SIMD_CFUNC simd_float16 __tg_fmin(simd_float16 x, simd_float16 y) {
1950#if defined __x86_64__ && defined __AVX512DQ__ && !__FINITE_MATH_ONLY__
1949#if defined __AVX512DQ__ && !__FINITE_MATH_ONLY__
19511950 return _mm512_range_ps(x, y, 4);
1952#elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__
1951#elif defined __AVX512F__ && __FINITE_MATH_ONLY__
19531952 return _mm512_min_ps(x, y);
1954#elif defined __x86_64__ && defined __AVX512F__
1953#elif defined __AVX512F__
19551954 return simd_bitselect(_mm512_min_ps(x, y), x, y != y);
19561955#else
19571956 return simd_make_float16(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi));
......@@ -1989,11 +1988,11 @@ static SIMD_CFUNC simd_double4 __tg_fmin(simd_double4 x, simd_double4 y) {
19891988}
19901989
19911990static SIMD_CFUNC simd_double8 __tg_fmin(simd_double8 x, simd_double8 y) {
1992#if defined __x86_64__ && defined __AVX512DQ__
1991#if defined __AVX512DQ__
19931992 return _mm512_range_pd(x, y, 4);
1994#elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__
1993#elif defined __AVX512F__ && __FINITE_MATH_ONLY__
19951994 return _mm512_min_pd(x, y);
1996#elif defined __x86_64__ && defined __AVX512F__
1995#elif defined __AVX512F__
19971996 return simd_bitselect(_mm512_min_pd(x, y), x, y != y);
19981997#else
19991998 return simd_make_double8(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi));
......@@ -2045,11 +2044,11 @@ static SIMD_CFUNC simd_float8 __tg_fmax(simd_float8 x, simd_float8 y) {
20452044}
20462045
20472046static SIMD_CFUNC simd_float16 __tg_fmax(simd_float16 x, simd_float16 y) {
2048#if defined __x86_64__ && defined __AVX512DQ__ && !__FINITE_MATH_ONLY__
2047#if defined __AVX512DQ__ && !__FINITE_MATH_ONLY__
20492048 return _mm512_range_ps(x, y, 5);
2050#elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__
2049#elif defined __AVX512F__ && __FINITE_MATH_ONLY__
20512050 return _mm512_max_ps(x, y);
2052#elif defined __x86_64__ && defined __AVX512F__
2051#elif defined __AVX512F__
20532052 return simd_bitselect(_mm512_max_ps(x, y), x, y != y);
20542053#else
20552054 return simd_make_float16(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi));
......@@ -2087,11 +2086,11 @@ static SIMD_CFUNC simd_double4 __tg_fmax(simd_double4 x, simd_double4 y) {
20872086}
20882087
20892088static SIMD_CFUNC simd_double8 __tg_fmax(simd_double8 x, simd_double8 y) {
2090#if defined __x86_64__ && defined __AVX512DQ__
2089#if defined __AVX512DQ__
20912090 return _mm512_range_pd(x, y, 5);
2092#elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__
2091#elif defined __AVX512F__ && __FINITE_MATH_ONLY__
20932092 return _mm512_max_pd(x, y);
2094#elif defined __x86_64__ && defined __AVX512F__
2093#elif defined __AVX512F__
20952094 return simd_bitselect(_mm512_max_pd(x, y), x, y != y);
20962095#else
20972096 return simd_make_double8(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi));
......@@ -2143,7 +2142,7 @@ static SIMD_CFUNC simd_float8 __tg_sqrt(simd_float8 x) {
21432142}
21442143
21452144static SIMD_CFUNC simd_float16 __tg_sqrt(simd_float16 x) {
2146#if defined __x86_64__ && defined __AVX512F__
2145#if defined __AVX512F__
21472146 return _mm512_sqrt_ps(x);
21482147#else
21492148 return simd_make_float16(__tg_sqrt(x.lo), __tg_sqrt(x.hi));
......@@ -2173,7 +2172,7 @@ static SIMD_CFUNC simd_double4 __tg_sqrt(simd_double4 x) {
21732172}
21742173
21752174static SIMD_CFUNC simd_double8 __tg_sqrt(simd_double8 x) {
2176#if defined __x86_64__ && defined __AVX512F__
2175#if defined __AVX512F__
21772176 return _mm512_sqrt_pd(x);
21782177#else
21792178 return simd_make_double8(__tg_sqrt(x.lo), __tg_sqrt(x.hi));
......@@ -2220,7 +2219,7 @@ static SIMD_CFUNC simd_float8 __tg_ceil(simd_float8 x) {
22202219}
22212220
22222221static SIMD_CFUNC simd_float16 __tg_ceil(simd_float16 x) {
2223#if defined __x86_64__ && defined __AVX512F__
2222#if defined __AVX512F__
22242223 return _mm512_roundscale_ps(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
22252224#else
22262225 return simd_make_float16(__tg_ceil(x.lo), __tg_ceil(x.hi));
......@@ -2258,7 +2257,7 @@ static SIMD_CFUNC simd_double4 __tg_ceil(simd_double4 x) {
22582257}
22592258
22602259static SIMD_CFUNC simd_double8 __tg_ceil(simd_double8 x) {
2261#if defined __x86_64__ && defined __AVX512F__
2260#if defined __AVX512F__
22622261 return _mm512_roundscale_pd(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
22632262#else
22642263 return simd_make_double8(__tg_ceil(x.lo), __tg_ceil(x.hi));
......@@ -2304,7 +2303,7 @@ static SIMD_CFUNC simd_float8 __tg_floor(simd_float8 x) {
23042303}
23052304
23062305static SIMD_CFUNC simd_float16 __tg_floor(simd_float16 x) {
2307#if defined __x86_64__ && defined __AVX512F__
2306#if defined __AVX512F__
23082307 return _mm512_roundscale_ps(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
23092308#else
23102309 return simd_make_float16(__tg_floor(x.lo), __tg_floor(x.hi));
......@@ -2342,7 +2341,7 @@ static SIMD_CFUNC simd_double4 __tg_floor(simd_double4 x) {
23422341}
23432342
23442343static SIMD_CFUNC simd_double8 __tg_floor(simd_double8 x) {
2345#if defined __x86_64__ && defined __AVX512F__
2344#if defined __AVX512F__
23462345 return _mm512_roundscale_pd(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
23472346#else
23482347 return simd_make_double8(__tg_floor(x.lo), __tg_floor(x.hi));
......@@ -2388,7 +2387,7 @@ static SIMD_CFUNC simd_float8 __tg_rint(simd_float8 x) {
23882387}
23892388
23902389static SIMD_CFUNC simd_float16 __tg_rint(simd_float16 x) {
2391#if defined __x86_64__ && defined __AVX512F__
2390#if defined __AVX512F__
23922391 return _mm512_roundscale_ps(x, _MM_FROUND_RINT);
23932392#else
23942393 return simd_make_float16(__tg_rint(x.lo), __tg_rint(x.hi));
......@@ -2426,7 +2425,7 @@ static SIMD_CFUNC simd_double4 __tg_rint(simd_double4 x) {
24262425}
24272426
24282427static SIMD_CFUNC simd_double8 __tg_rint(simd_double8 x) {
2429#if defined __x86_64__ && defined __AVX512F__
2428#if defined __AVX512F__
24302429 return _mm512_roundscale_pd(x, _MM_FROUND_RINT);
24312430#else
24322431 return simd_make_double8(__tg_rint(x.lo), __tg_rint(x.hi));
......@@ -2473,7 +2472,7 @@ static SIMD_CFUNC simd_float8 __tg_trunc(simd_float8 x) {
24732472}
24742473
24752474static SIMD_CFUNC simd_float16 __tg_trunc(simd_float16 x) {
2476#if defined __x86_64__ && defined __AVX512F__
2475#if defined __AVX512F__
24772476 return _mm512_roundscale_ps(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
24782477#else
24792478 return simd_make_float16(__tg_trunc(x.lo), __tg_trunc(x.hi));
......@@ -2512,7 +2511,7 @@ static SIMD_CFUNC simd_double4 __tg_trunc(simd_double4 x) {
25122511}
25132512
25142513static SIMD_CFUNC simd_double8 __tg_trunc(simd_double8 x) {
2515#if defined __x86_64__ && defined __AVX512F__
2514#if defined __AVX512F__
25162515 return _mm512_roundscale_pd(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
25172516#else
25182517 return simd_make_double8(__tg_trunc(x.lo), __tg_trunc(x.hi));
......@@ -2544,7 +2543,7 @@ static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x) {
25442543}
25452544#endif
25462545
2547#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
2546#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
25482547extern simd_float8 _simd_sin_f8(simd_float8 x);
25492548static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x) {
25502549 return _simd_sin_f8(x);
......@@ -2555,7 +2554,7 @@ static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x) {
25552554}
25562555#endif
25572556
2558#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
2557#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
25592558extern simd_float16 _simd_sin_f16(simd_float16 x);
25602559static inline SIMD_CFUNC simd_float16 __tg_sin(simd_float16 x) {
25612560 return _simd_sin_f16(x);
......@@ -2586,7 +2585,7 @@ static inline SIMD_CFUNC simd_double3 __tg_sin(simd_double3 x) {
25862585 return simd_make_double3(__tg_sin(simd_make_double4(x)));
25872586}
25882587
2589#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
2588#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
25902589extern simd_double4 _simd_sin_d4(simd_double4 x);
25912590static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x) {
25922591 return _simd_sin_d4(x);
......@@ -2597,7 +2596,7 @@ static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x) {
25972596}
25982597#endif
25992598
2600#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
2599#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
26012600extern simd_double8 _simd_sin_d8(simd_double8 x);
26022601static inline SIMD_CFUNC simd_double8 __tg_sin(simd_double8 x) {
26032602 return _simd_sin_d8(x);
......@@ -2632,7 +2631,7 @@ static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x) {
26322631}
26332632#endif
26342633
2635#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
2634#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
26362635extern simd_float8 _simd_cos_f8(simd_float8 x);
26372636static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x) {
26382637 return _simd_cos_f8(x);
......@@ -2643,7 +2642,7 @@ static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x) {
26432642}
26442643#endif
26452644
2646#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
2645#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
26472646extern simd_float16 _simd_cos_f16(simd_float16 x);
26482647static inline SIMD_CFUNC simd_float16 __tg_cos(simd_float16 x) {
26492648 return _simd_cos_f16(x);
......@@ -2674,7 +2673,7 @@ static inline SIMD_CFUNC simd_double3 __tg_cos(simd_double3 x) {
26742673 return simd_make_double3(__tg_cos(simd_make_double4(x)));
26752674}
26762675
2677#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
2676#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
26782677extern simd_double4 _simd_cos_d4(simd_double4 x);
26792678static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x) {
26802679 return _simd_cos_d4(x);
......@@ -2685,7 +2684,7 @@ static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x) {
26852684}
26862685#endif
26872686
2688#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
2687#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
26892688extern simd_double8 _simd_cos_d8(simd_double8 x);
26902689static inline SIMD_CFUNC simd_double8 __tg_cos(simd_double8 x) {
26912690 return _simd_cos_d8(x);
......@@ -2717,7 +2716,7 @@ static inline SIMD_CFUNC simd_float4 __tg_acos(simd_float4 x) {
27172716}
27182717#endif
27192718
2720#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
2719#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
27212720extern simd_float8 _simd_acos_f8(simd_float8 x);
27222721static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x) {
27232722 return _simd_acos_f8(x);
......@@ -2728,7 +2727,7 @@ static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x) {
27282727}
27292728#endif
27302729
2731#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
2730#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
27322731extern simd_float16 _simd_acos_f16(simd_float16 x);
27332732static inline SIMD_CFUNC simd_float16 __tg_acos(simd_float16 x) {
27342733 return _simd_acos_f16(x);
......@@ -2754,7 +2753,7 @@ static inline SIMD_CFUNC simd_double3 __tg_acos(simd_double3 x) {
27542753 return simd_make_double3(__tg_acos(simd_make_double4(x)));
27552754}
27562755
2757#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
2756#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
27582757extern simd_double4 _simd_acos_d4(simd_double4 x);
27592758static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x) {
27602759 return _simd_acos_d4(x);
......@@ -2765,7 +2764,7 @@ static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x) {
27652764}
27662765#endif
27672766
2768#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
2767#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
27692768extern simd_double8 _simd_acos_d8(simd_double8 x);
27702769static inline SIMD_CFUNC simd_double8 __tg_acos(simd_double8 x) {
27712770 return _simd_acos_d8(x);
......@@ -2796,7 +2795,7 @@ static inline SIMD_CFUNC simd_float4 __tg_asin(simd_float4 x) {
27962795}
27972796#endif
27982797
2799#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
2798#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
28002799extern simd_float8 _simd_asin_f8(simd_float8 x);
28012800static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x) {
28022801 return _simd_asin_f8(x);
......@@ -2807,7 +2806,7 @@ static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x) {
28072806}
28082807#endif
28092808
2810#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
2809#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
28112810extern simd_float16 _simd_asin_f16(simd_float16 x);
28122811static inline SIMD_CFUNC simd_float16 __tg_asin(simd_float16 x) {
28132812 return _simd_asin_f16(x);
......@@ -2833,7 +2832,7 @@ static inline SIMD_CFUNC simd_double3 __tg_asin(simd_double3 x) {
28332832 return simd_make_double3(__tg_asin(simd_make_double4(x)));
28342833}
28352834
2836#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
2835#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
28372836extern simd_double4 _simd_asin_d4(simd_double4 x);
28382837static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x) {
28392838 return _simd_asin_d4(x);
......@@ -2844,7 +2843,7 @@ static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x) {
28442843}
28452844#endif
28462845
2847#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
2846#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
28482847extern simd_double8 _simd_asin_d8(simd_double8 x);
28492848static inline SIMD_CFUNC simd_double8 __tg_asin(simd_double8 x) {
28502849 return _simd_asin_d8(x);
......@@ -2875,7 +2874,7 @@ static inline SIMD_CFUNC simd_float4 __tg_atan(simd_float4 x) {
28752874}
28762875#endif
28772876
2878#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
2877#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
28792878extern simd_float8 _simd_atan_f8(simd_float8 x);
28802879static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x) {
28812880 return _simd_atan_f8(x);
......@@ -2886,7 +2885,7 @@ static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x) {
28862885}
28872886#endif
28882887
2889#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
2888#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
28902889extern simd_float16 _simd_atan_f16(simd_float16 x);
28912890static inline SIMD_CFUNC simd_float16 __tg_atan(simd_float16 x) {
28922891 return _simd_atan_f16(x);
......@@ -2912,7 +2911,7 @@ static inline SIMD_CFUNC simd_double3 __tg_atan(simd_double3 x) {
29122911 return simd_make_double3(__tg_atan(simd_make_double4(x)));
29132912}
29142913
2915#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
2914#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
29162915extern simd_double4 _simd_atan_d4(simd_double4 x);
29172916static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x) {
29182917 return _simd_atan_d4(x);
......@@ -2923,7 +2922,7 @@ static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x) {
29232922}
29242923#endif
29252924
2926#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
2925#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
29272926extern simd_double8 _simd_atan_d8(simd_double8 x);
29282927static inline SIMD_CFUNC simd_double8 __tg_atan(simd_double8 x) {
29292928 return _simd_atan_d8(x);
......@@ -2954,7 +2953,7 @@ static inline SIMD_CFUNC simd_float4 __tg_tan(simd_float4 x) {
29542953}
29552954#endif
29562955
2957#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
2956#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
29582957extern simd_float8 _simd_tan_f8(simd_float8 x);
29592958static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x) {
29602959 return _simd_tan_f8(x);
......@@ -2965,7 +2964,7 @@ static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x) {
29652964}
29662965#endif
29672966
2968#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
2967#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
29692968extern simd_float16 _simd_tan_f16(simd_float16 x);
29702969static inline SIMD_CFUNC simd_float16 __tg_tan(simd_float16 x) {
29712970 return _simd_tan_f16(x);
......@@ -2991,7 +2990,7 @@ static inline SIMD_CFUNC simd_double3 __tg_tan(simd_double3 x) {
29912990 return simd_make_double3(__tg_tan(simd_make_double4(x)));
29922991}
29932992
2994#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
2993#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
29952994extern simd_double4 _simd_tan_d4(simd_double4 x);
29962995static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x) {
29972996 return _simd_tan_d4(x);
......@@ -3002,7 +3001,7 @@ static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x) {
30023001}
30033002#endif
30043003
3005#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3004#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
30063005extern simd_double8 _simd_tan_d8(simd_double8 x);
30073006static inline SIMD_CFUNC simd_double8 __tg_tan(simd_double8 x) {
30083007 return _simd_tan_d8(x);
......@@ -3034,7 +3033,7 @@ static inline SIMD_CFUNC simd_float4 __tg_cospi(simd_float4 x) {
30343033}
30353034#endif
30363035
3037#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3036#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
30383037extern simd_float8 _simd_cospi_f8(simd_float8 x);
30393038static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x) {
30403039 return _simd_cospi_f8(x);
......@@ -3045,7 +3044,7 @@ static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x) {
30453044}
30463045#endif
30473046
3048#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3047#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
30493048extern simd_float16 _simd_cospi_f16(simd_float16 x);
30503049static inline SIMD_CFUNC simd_float16 __tg_cospi(simd_float16 x) {
30513050 return _simd_cospi_f16(x);
......@@ -3071,7 +3070,7 @@ static inline SIMD_CFUNC simd_double3 __tg_cospi(simd_double3 x) {
30713070 return simd_make_double3(__tg_cospi(simd_make_double4(x)));
30723071}
30733072
3074#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3073#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
30753074extern simd_double4 _simd_cospi_d4(simd_double4 x);
30763075static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x) {
30773076 return _simd_cospi_d4(x);
......@@ -3082,7 +3081,7 @@ static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x) {
30823081}
30833082#endif
30843083
3085#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3084#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
30863085extern simd_double8 _simd_cospi_d8(simd_double8 x);
30873086static inline SIMD_CFUNC simd_double8 __tg_cospi(simd_double8 x) {
30883087 return _simd_cospi_d8(x);
......@@ -3115,7 +3114,7 @@ static inline SIMD_CFUNC simd_float4 __tg_sinpi(simd_float4 x) {
31153114}
31163115#endif
31173116
3118#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3117#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
31193118extern simd_float8 _simd_sinpi_f8(simd_float8 x);
31203119static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x) {
31213120 return _simd_sinpi_f8(x);
......@@ -3126,7 +3125,7 @@ static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x) {
31263125}
31273126#endif
31283127
3129#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3128#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
31303129extern simd_float16 _simd_sinpi_f16(simd_float16 x);
31313130static inline SIMD_CFUNC simd_float16 __tg_sinpi(simd_float16 x) {
31323131 return _simd_sinpi_f16(x);
......@@ -3152,7 +3151,7 @@ static inline SIMD_CFUNC simd_double3 __tg_sinpi(simd_double3 x) {
31523151 return simd_make_double3(__tg_sinpi(simd_make_double4(x)));
31533152}
31543153
3155#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3154#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
31563155extern simd_double4 _simd_sinpi_d4(simd_double4 x);
31573156static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x) {
31583157 return _simd_sinpi_d4(x);
......@@ -3163,7 +3162,7 @@ static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x) {
31633162}
31643163#endif
31653164
3166#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3165#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
31673166extern simd_double8 _simd_sinpi_d8(simd_double8 x);
31683167static inline SIMD_CFUNC simd_double8 __tg_sinpi(simd_double8 x) {
31693168 return _simd_sinpi_d8(x);
......@@ -3196,7 +3195,7 @@ static inline SIMD_CFUNC simd_float4 __tg_tanpi(simd_float4 x) {
31963195}
31973196#endif
31983197
3199#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3198#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
32003199extern simd_float8 _simd_tanpi_f8(simd_float8 x);
32013200static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x) {
32023201 return _simd_tanpi_f8(x);
......@@ -3207,7 +3206,7 @@ static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x) {
32073206}
32083207#endif
32093208
3210#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3209#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
32113210extern simd_float16 _simd_tanpi_f16(simd_float16 x);
32123211static inline SIMD_CFUNC simd_float16 __tg_tanpi(simd_float16 x) {
32133212 return _simd_tanpi_f16(x);
......@@ -3233,7 +3232,7 @@ static inline SIMD_CFUNC simd_double3 __tg_tanpi(simd_double3 x) {
32333232 return simd_make_double3(__tg_tanpi(simd_make_double4(x)));
32343233}
32353234
3236#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3235#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
32373236extern simd_double4 _simd_tanpi_d4(simd_double4 x);
32383237static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x) {
32393238 return _simd_tanpi_d4(x);
......@@ -3244,7 +3243,7 @@ static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x) {
32443243}
32453244#endif
32463245
3247#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3246#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
32483247extern simd_double8 _simd_tanpi_d8(simd_double8 x);
32493248static inline SIMD_CFUNC simd_double8 __tg_tanpi(simd_double8 x) {
32503249 return _simd_tanpi_d8(x);
......@@ -3276,7 +3275,7 @@ static inline SIMD_CFUNC simd_float4 __tg_acosh(simd_float4 x) {
32763275}
32773276#endif
32783277
3279#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3278#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
32803279extern simd_float8 _simd_acosh_f8(simd_float8 x);
32813280static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x) {
32823281 return _simd_acosh_f8(x);
......@@ -3287,7 +3286,7 @@ static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x) {
32873286}
32883287#endif
32893288
3290#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3289#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
32913290extern simd_float16 _simd_acosh_f16(simd_float16 x);
32923291static inline SIMD_CFUNC simd_float16 __tg_acosh(simd_float16 x) {
32933292 return _simd_acosh_f16(x);
......@@ -3313,7 +3312,7 @@ static inline SIMD_CFUNC simd_double3 __tg_acosh(simd_double3 x) {
33133312 return simd_make_double3(__tg_acosh(simd_make_double4(x)));
33143313}
33153314
3316#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3315#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
33173316extern simd_double4 _simd_acosh_d4(simd_double4 x);
33183317static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x) {
33193318 return _simd_acosh_d4(x);
......@@ -3324,7 +3323,7 @@ static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x) {
33243323}
33253324#endif
33263325
3327#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3326#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
33283327extern simd_double8 _simd_acosh_d8(simd_double8 x);
33293328static inline SIMD_CFUNC simd_double8 __tg_acosh(simd_double8 x) {
33303329 return _simd_acosh_d8(x);
......@@ -3355,7 +3354,7 @@ static inline SIMD_CFUNC simd_float4 __tg_asinh(simd_float4 x) {
33553354}
33563355#endif
33573356
3358#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3357#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
33593358extern simd_float8 _simd_asinh_f8(simd_float8 x);
33603359static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x) {
33613360 return _simd_asinh_f8(x);
......@@ -3366,7 +3365,7 @@ static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x) {
33663365}
33673366#endif
33683367
3369#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3368#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
33703369extern simd_float16 _simd_asinh_f16(simd_float16 x);
33713370static inline SIMD_CFUNC simd_float16 __tg_asinh(simd_float16 x) {
33723371 return _simd_asinh_f16(x);
......@@ -3392,7 +3391,7 @@ static inline SIMD_CFUNC simd_double3 __tg_asinh(simd_double3 x) {
33923391 return simd_make_double3(__tg_asinh(simd_make_double4(x)));
33933392}
33943393
3395#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3394#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
33963395extern simd_double4 _simd_asinh_d4(simd_double4 x);
33973396static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x) {
33983397 return _simd_asinh_d4(x);
......@@ -3403,7 +3402,7 @@ static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x) {
34033402}
34043403#endif
34053404
3406#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3405#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
34073406extern simd_double8 _simd_asinh_d8(simd_double8 x);
34083407static inline SIMD_CFUNC simd_double8 __tg_asinh(simd_double8 x) {
34093408 return _simd_asinh_d8(x);
......@@ -3434,7 +3433,7 @@ static inline SIMD_CFUNC simd_float4 __tg_atanh(simd_float4 x) {
34343433}
34353434#endif
34363435
3437#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3436#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
34383437extern simd_float8 _simd_atanh_f8(simd_float8 x);
34393438static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x) {
34403439 return _simd_atanh_f8(x);
......@@ -3445,7 +3444,7 @@ static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x) {
34453444}
34463445#endif
34473446
3448#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3447#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
34493448extern simd_float16 _simd_atanh_f16(simd_float16 x);
34503449static inline SIMD_CFUNC simd_float16 __tg_atanh(simd_float16 x) {
34513450 return _simd_atanh_f16(x);
......@@ -3471,7 +3470,7 @@ static inline SIMD_CFUNC simd_double3 __tg_atanh(simd_double3 x) {
34713470 return simd_make_double3(__tg_atanh(simd_make_double4(x)));
34723471}
34733472
3474#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3473#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
34753474extern simd_double4 _simd_atanh_d4(simd_double4 x);
34763475static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x) {
34773476 return _simd_atanh_d4(x);
......@@ -3482,7 +3481,7 @@ static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x) {
34823481}
34833482#endif
34843483
3485#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3484#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
34863485extern simd_double8 _simd_atanh_d8(simd_double8 x);
34873486static inline SIMD_CFUNC simd_double8 __tg_atanh(simd_double8 x) {
34883487 return _simd_atanh_d8(x);
......@@ -3513,7 +3512,7 @@ static inline SIMD_CFUNC simd_float4 __tg_cosh(simd_float4 x) {
35133512}
35143513#endif
35153514
3516#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3515#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
35173516extern simd_float8 _simd_cosh_f8(simd_float8 x);
35183517static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x) {
35193518 return _simd_cosh_f8(x);
......@@ -3524,7 +3523,7 @@ static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x) {
35243523}
35253524#endif
35263525
3527#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3526#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
35283527extern simd_float16 _simd_cosh_f16(simd_float16 x);
35293528static inline SIMD_CFUNC simd_float16 __tg_cosh(simd_float16 x) {
35303529 return _simd_cosh_f16(x);
......@@ -3550,7 +3549,7 @@ static inline SIMD_CFUNC simd_double3 __tg_cosh(simd_double3 x) {
35503549 return simd_make_double3(__tg_cosh(simd_make_double4(x)));
35513550}
35523551
3553#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3552#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
35543553extern simd_double4 _simd_cosh_d4(simd_double4 x);
35553554static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x) {
35563555 return _simd_cosh_d4(x);
......@@ -3561,7 +3560,7 @@ static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x) {
35613560}
35623561#endif
35633562
3564#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3563#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
35653564extern simd_double8 _simd_cosh_d8(simd_double8 x);
35663565static inline SIMD_CFUNC simd_double8 __tg_cosh(simd_double8 x) {
35673566 return _simd_cosh_d8(x);
......@@ -3592,7 +3591,7 @@ static inline SIMD_CFUNC simd_float4 __tg_sinh(simd_float4 x) {
35923591}
35933592#endif
35943593
3595#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3594#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
35963595extern simd_float8 _simd_sinh_f8(simd_float8 x);
35973596static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x) {
35983597 return _simd_sinh_f8(x);
......@@ -3603,7 +3602,7 @@ static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x) {
36033602}
36043603#endif
36053604
3606#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3605#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
36073606extern simd_float16 _simd_sinh_f16(simd_float16 x);
36083607static inline SIMD_CFUNC simd_float16 __tg_sinh(simd_float16 x) {
36093608 return _simd_sinh_f16(x);
......@@ -3629,7 +3628,7 @@ static inline SIMD_CFUNC simd_double3 __tg_sinh(simd_double3 x) {
36293628 return simd_make_double3(__tg_sinh(simd_make_double4(x)));
36303629}
36313630
3632#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3631#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
36333632extern simd_double4 _simd_sinh_d4(simd_double4 x);
36343633static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x) {
36353634 return _simd_sinh_d4(x);
......@@ -3640,7 +3639,7 @@ static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x) {
36403639}
36413640#endif
36423641
3643#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3642#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
36443643extern simd_double8 _simd_sinh_d8(simd_double8 x);
36453644static inline SIMD_CFUNC simd_double8 __tg_sinh(simd_double8 x) {
36463645 return _simd_sinh_d8(x);
......@@ -3671,7 +3670,7 @@ static inline SIMD_CFUNC simd_float4 __tg_tanh(simd_float4 x) {
36713670}
36723671#endif
36733672
3674#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3673#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
36753674extern simd_float8 _simd_tanh_f8(simd_float8 x);
36763675static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x) {
36773676 return _simd_tanh_f8(x);
......@@ -3682,7 +3681,7 @@ static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x) {
36823681}
36833682#endif
36843683
3685#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3684#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
36863685extern simd_float16 _simd_tanh_f16(simd_float16 x);
36873686static inline SIMD_CFUNC simd_float16 __tg_tanh(simd_float16 x) {
36883687 return _simd_tanh_f16(x);
......@@ -3708,7 +3707,7 @@ static inline SIMD_CFUNC simd_double3 __tg_tanh(simd_double3 x) {
37083707 return simd_make_double3(__tg_tanh(simd_make_double4(x)));
37093708}
37103709
3711#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3710#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
37123711extern simd_double4 _simd_tanh_d4(simd_double4 x);
37133712static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x) {
37143713 return _simd_tanh_d4(x);
......@@ -3719,7 +3718,7 @@ static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x) {
37193718}
37203719#endif
37213720
3722#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3721#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
37233722extern simd_double8 _simd_tanh_d8(simd_double8 x);
37243723static inline SIMD_CFUNC simd_double8 __tg_tanh(simd_double8 x) {
37253724 return _simd_tanh_d8(x);
......@@ -3750,7 +3749,7 @@ static inline SIMD_CFUNC simd_float4 __tg_exp(simd_float4 x) {
37503749}
37513750#endif
37523751
3753#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3752#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
37543753extern simd_float8 _simd_exp_f8(simd_float8 x);
37553754static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x) {
37563755 return _simd_exp_f8(x);
......@@ -3761,7 +3760,7 @@ static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x) {
37613760}
37623761#endif
37633762
3764#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3763#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
37653764extern simd_float16 _simd_exp_f16(simd_float16 x);
37663765static inline SIMD_CFUNC simd_float16 __tg_exp(simd_float16 x) {
37673766 return _simd_exp_f16(x);
......@@ -3787,7 +3786,7 @@ static inline SIMD_CFUNC simd_double3 __tg_exp(simd_double3 x) {
37873786 return simd_make_double3(__tg_exp(simd_make_double4(x)));
37883787}
37893788
3790#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3789#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
37913790extern simd_double4 _simd_exp_d4(simd_double4 x);
37923791static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x) {
37933792 return _simd_exp_d4(x);
......@@ -3798,7 +3797,7 @@ static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x) {
37983797}
37993798#endif
38003799
3801#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3800#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
38023801extern simd_double8 _simd_exp_d8(simd_double8 x);
38033802static inline SIMD_CFUNC simd_double8 __tg_exp(simd_double8 x) {
38043803 return _simd_exp_d8(x);
......@@ -3829,7 +3828,7 @@ static inline SIMD_CFUNC simd_float4 __tg_exp2(simd_float4 x) {
38293828}
38303829#endif
38313830
3832#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3831#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
38333832extern simd_float8 _simd_exp2_f8(simd_float8 x);
38343833static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x) {
38353834 return _simd_exp2_f8(x);
......@@ -3840,7 +3839,7 @@ static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x) {
38403839}
38413840#endif
38423841
3843#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3842#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
38443843extern simd_float16 _simd_exp2_f16(simd_float16 x);
38453844static inline SIMD_CFUNC simd_float16 __tg_exp2(simd_float16 x) {
38463845 return _simd_exp2_f16(x);
......@@ -3866,7 +3865,7 @@ static inline SIMD_CFUNC simd_double3 __tg_exp2(simd_double3 x) {
38663865 return simd_make_double3(__tg_exp2(simd_make_double4(x)));
38673866}
38683867
3869#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3868#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
38703869extern simd_double4 _simd_exp2_d4(simd_double4 x);
38713870static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x) {
38723871 return _simd_exp2_d4(x);
......@@ -3877,7 +3876,7 @@ static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x) {
38773876}
38783877#endif
38793878
3880#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3879#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
38813880extern simd_double8 _simd_exp2_d8(simd_double8 x);
38823881static inline SIMD_CFUNC simd_double8 __tg_exp2(simd_double8 x) {
38833882 return _simd_exp2_d8(x);
......@@ -3909,7 +3908,7 @@ static inline SIMD_CFUNC simd_float4 __tg_exp10(simd_float4 x) {
39093908}
39103909#endif
39113910
3912#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3911#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
39133912extern simd_float8 _simd_exp10_f8(simd_float8 x);
39143913static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x) {
39153914 return _simd_exp10_f8(x);
......@@ -3920,7 +3919,7 @@ static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x) {
39203919}
39213920#endif
39223921
3923#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3922#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
39243923extern simd_float16 _simd_exp10_f16(simd_float16 x);
39253924static inline SIMD_CFUNC simd_float16 __tg_exp10(simd_float16 x) {
39263925 return _simd_exp10_f16(x);
......@@ -3946,7 +3945,7 @@ static inline SIMD_CFUNC simd_double3 __tg_exp10(simd_double3 x) {
39463945 return simd_make_double3(__tg_exp10(simd_make_double4(x)));
39473946}
39483947
3949#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3948#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
39503949extern simd_double4 _simd_exp10_d4(simd_double4 x);
39513950static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x) {
39523951 return _simd_exp10_d4(x);
......@@ -3957,7 +3956,7 @@ static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x) {
39573956}
39583957#endif
39593958
3960#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
3959#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
39613960extern simd_double8 _simd_exp10_d8(simd_double8 x);
39623961static inline SIMD_CFUNC simd_double8 __tg_exp10(simd_double8 x) {
39633962 return _simd_exp10_d8(x);
......@@ -3989,7 +3988,7 @@ static inline SIMD_CFUNC simd_float4 __tg_expm1(simd_float4 x) {
39893988}
39903989#endif
39913990
3992#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
3991#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
39933992extern simd_float8 _simd_expm1_f8(simd_float8 x);
39943993static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x) {
39953994 return _simd_expm1_f8(x);
......@@ -4000,7 +3999,7 @@ static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x) {
40003999}
40014000#endif
40024001
4003#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4002#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
40044003extern simd_float16 _simd_expm1_f16(simd_float16 x);
40054004static inline SIMD_CFUNC simd_float16 __tg_expm1(simd_float16 x) {
40064005 return _simd_expm1_f16(x);
......@@ -4026,7 +4025,7 @@ static inline SIMD_CFUNC simd_double3 __tg_expm1(simd_double3 x) {
40264025 return simd_make_double3(__tg_expm1(simd_make_double4(x)));
40274026}
40284027
4029#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4028#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
40304029extern simd_double4 _simd_expm1_d4(simd_double4 x);
40314030static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x) {
40324031 return _simd_expm1_d4(x);
......@@ -4037,7 +4036,7 @@ static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x) {
40374036}
40384037#endif
40394038
4040#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4039#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
40414040extern simd_double8 _simd_expm1_d8(simd_double8 x);
40424041static inline SIMD_CFUNC simd_double8 __tg_expm1(simd_double8 x) {
40434042 return _simd_expm1_d8(x);
......@@ -4068,7 +4067,7 @@ static inline SIMD_CFUNC simd_float4 __tg_log(simd_float4 x) {
40684067}
40694068#endif
40704069
4071#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4070#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
40724071extern simd_float8 _simd_log_f8(simd_float8 x);
40734072static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x) {
40744073 return _simd_log_f8(x);
......@@ -4079,7 +4078,7 @@ static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x) {
40794078}
40804079#endif
40814080
4082#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4081#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
40834082extern simd_float16 _simd_log_f16(simd_float16 x);
40844083static inline SIMD_CFUNC simd_float16 __tg_log(simd_float16 x) {
40854084 return _simd_log_f16(x);
......@@ -4105,7 +4104,7 @@ static inline SIMD_CFUNC simd_double3 __tg_log(simd_double3 x) {
41054104 return simd_make_double3(__tg_log(simd_make_double4(x)));
41064105}
41074106
4108#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4107#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
41094108extern simd_double4 _simd_log_d4(simd_double4 x);
41104109static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x) {
41114110 return _simd_log_d4(x);
......@@ -4116,7 +4115,7 @@ static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x) {
41164115}
41174116#endif
41184117
4119#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4118#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
41204119extern simd_double8 _simd_log_d8(simd_double8 x);
41214120static inline SIMD_CFUNC simd_double8 __tg_log(simd_double8 x) {
41224121 return _simd_log_d8(x);
......@@ -4147,7 +4146,7 @@ static inline SIMD_CFUNC simd_float4 __tg_log2(simd_float4 x) {
41474146}
41484147#endif
41494148
4150#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4149#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
41514150extern simd_float8 _simd_log2_f8(simd_float8 x);
41524151static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x) {
41534152 return _simd_log2_f8(x);
......@@ -4158,7 +4157,7 @@ static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x) {
41584157}
41594158#endif
41604159
4161#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4160#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
41624161extern simd_float16 _simd_log2_f16(simd_float16 x);
41634162static inline SIMD_CFUNC simd_float16 __tg_log2(simd_float16 x) {
41644163 return _simd_log2_f16(x);
......@@ -4184,7 +4183,7 @@ static inline SIMD_CFUNC simd_double3 __tg_log2(simd_double3 x) {
41844183 return simd_make_double3(__tg_log2(simd_make_double4(x)));
41854184}
41864185
4187#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4186#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
41884187extern simd_double4 _simd_log2_d4(simd_double4 x);
41894188static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x) {
41904189 return _simd_log2_d4(x);
......@@ -4195,7 +4194,7 @@ static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x) {
41954194}
41964195#endif
41974196
4198#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4197#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
41994198extern simd_double8 _simd_log2_d8(simd_double8 x);
42004199static inline SIMD_CFUNC simd_double8 __tg_log2(simd_double8 x) {
42014200 return _simd_log2_d8(x);
......@@ -4226,7 +4225,7 @@ static inline SIMD_CFUNC simd_float4 __tg_log10(simd_float4 x) {
42264225}
42274226#endif
42284227
4229#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4228#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
42304229extern simd_float8 _simd_log10_f8(simd_float8 x);
42314230static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x) {
42324231 return _simd_log10_f8(x);
......@@ -4237,7 +4236,7 @@ static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x) {
42374236}
42384237#endif
42394238
4240#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4239#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
42414240extern simd_float16 _simd_log10_f16(simd_float16 x);
42424241static inline SIMD_CFUNC simd_float16 __tg_log10(simd_float16 x) {
42434242 return _simd_log10_f16(x);
......@@ -4263,7 +4262,7 @@ static inline SIMD_CFUNC simd_double3 __tg_log10(simd_double3 x) {
42634262 return simd_make_double3(__tg_log10(simd_make_double4(x)));
42644263}
42654264
4266#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4265#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
42674266extern simd_double4 _simd_log10_d4(simd_double4 x);
42684267static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x) {
42694268 return _simd_log10_d4(x);
......@@ -4274,7 +4273,7 @@ static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x) {
42744273}
42754274#endif
42764275
4277#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4276#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
42784277extern simd_double8 _simd_log10_d8(simd_double8 x);
42794278static inline SIMD_CFUNC simd_double8 __tg_log10(simd_double8 x) {
42804279 return _simd_log10_d8(x);
......@@ -4305,7 +4304,7 @@ static inline SIMD_CFUNC simd_float4 __tg_log1p(simd_float4 x) {
43054304}
43064305#endif
43074306
4308#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4307#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
43094308extern simd_float8 _simd_log1p_f8(simd_float8 x);
43104309static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x) {
43114310 return _simd_log1p_f8(x);
......@@ -4316,7 +4315,7 @@ static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x) {
43164315}
43174316#endif
43184317
4319#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4318#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
43204319extern simd_float16 _simd_log1p_f16(simd_float16 x);
43214320static inline SIMD_CFUNC simd_float16 __tg_log1p(simd_float16 x) {
43224321 return _simd_log1p_f16(x);
......@@ -4342,7 +4341,7 @@ static inline SIMD_CFUNC simd_double3 __tg_log1p(simd_double3 x) {
43424341 return simd_make_double3(__tg_log1p(simd_make_double4(x)));
43434342}
43444343
4345#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4344#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
43464345extern simd_double4 _simd_log1p_d4(simd_double4 x);
43474346static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x) {
43484347 return _simd_log1p_d4(x);
......@@ -4353,7 +4352,7 @@ static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x) {
43534352}
43544353#endif
43554354
4356#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4355#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
43574356extern simd_double8 _simd_log1p_d8(simd_double8 x);
43584357static inline SIMD_CFUNC simd_double8 __tg_log1p(simd_double8 x) {
43594358 return _simd_log1p_d8(x);
......@@ -4384,7 +4383,7 @@ static inline SIMD_CFUNC simd_float4 __tg_cbrt(simd_float4 x) {
43844383}
43854384#endif
43864385
4387#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4386#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
43884387extern simd_float8 _simd_cbrt_f8(simd_float8 x);
43894388static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x) {
43904389 return _simd_cbrt_f8(x);
......@@ -4395,7 +4394,7 @@ static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x) {
43954394}
43964395#endif
43974396
4398#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4397#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
43994398extern simd_float16 _simd_cbrt_f16(simd_float16 x);
44004399static inline SIMD_CFUNC simd_float16 __tg_cbrt(simd_float16 x) {
44014400 return _simd_cbrt_f16(x);
......@@ -4421,7 +4420,7 @@ static inline SIMD_CFUNC simd_double3 __tg_cbrt(simd_double3 x) {
44214420 return simd_make_double3(__tg_cbrt(simd_make_double4(x)));
44224421}
44234422
4424#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4423#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
44254424extern simd_double4 _simd_cbrt_d4(simd_double4 x);
44264425static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x) {
44274426 return _simd_cbrt_d4(x);
......@@ -4432,7 +4431,7 @@ static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x) {
44324431}
44334432#endif
44344433
4435#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4434#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
44364435extern simd_double8 _simd_cbrt_d8(simd_double8 x);
44374436static inline SIMD_CFUNC simd_double8 __tg_cbrt(simd_double8 x) {
44384437 return _simd_cbrt_d8(x);
......@@ -4463,7 +4462,7 @@ static inline SIMD_CFUNC simd_float4 __tg_erf(simd_float4 x) {
44634462}
44644463#endif
44654464
4466#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4465#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
44674466extern simd_float8 _simd_erf_f8(simd_float8 x);
44684467static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x) {
44694468 return _simd_erf_f8(x);
......@@ -4474,7 +4473,7 @@ static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x) {
44744473}
44754474#endif
44764475
4477#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4476#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
44784477extern simd_float16 _simd_erf_f16(simd_float16 x);
44794478static inline SIMD_CFUNC simd_float16 __tg_erf(simd_float16 x) {
44804479 return _simd_erf_f16(x);
......@@ -4500,7 +4499,7 @@ static inline SIMD_CFUNC simd_double3 __tg_erf(simd_double3 x) {
45004499 return simd_make_double3(__tg_erf(simd_make_double4(x)));
45014500}
45024501
4503#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4502#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
45044503extern simd_double4 _simd_erf_d4(simd_double4 x);
45054504static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x) {
45064505 return _simd_erf_d4(x);
......@@ -4511,7 +4510,7 @@ static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x) {
45114510}
45124511#endif
45134512
4514#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4513#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
45154514extern simd_double8 _simd_erf_d8(simd_double8 x);
45164515static inline SIMD_CFUNC simd_double8 __tg_erf(simd_double8 x) {
45174516 return _simd_erf_d8(x);
......@@ -4542,7 +4541,7 @@ static inline SIMD_CFUNC simd_float4 __tg_erfc(simd_float4 x) {
45424541}
45434542#endif
45444543
4545#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4544#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
45464545extern simd_float8 _simd_erfc_f8(simd_float8 x);
45474546static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x) {
45484547 return _simd_erfc_f8(x);
......@@ -4553,7 +4552,7 @@ static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x) {
45534552}
45544553#endif
45554554
4556#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4555#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
45574556extern simd_float16 _simd_erfc_f16(simd_float16 x);
45584557static inline SIMD_CFUNC simd_float16 __tg_erfc(simd_float16 x) {
45594558 return _simd_erfc_f16(x);
......@@ -4579,7 +4578,7 @@ static inline SIMD_CFUNC simd_double3 __tg_erfc(simd_double3 x) {
45794578 return simd_make_double3(__tg_erfc(simd_make_double4(x)));
45804579}
45814580
4582#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4581#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
45834582extern simd_double4 _simd_erfc_d4(simd_double4 x);
45844583static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x) {
45854584 return _simd_erfc_d4(x);
......@@ -4590,7 +4589,7 @@ static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x) {
45904589}
45914590#endif
45924591
4593#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4592#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
45944593extern simd_double8 _simd_erfc_d8(simd_double8 x);
45954594static inline SIMD_CFUNC simd_double8 __tg_erfc(simd_double8 x) {
45964595 return _simd_erfc_d8(x);
......@@ -4621,7 +4620,7 @@ static inline SIMD_CFUNC simd_float4 __tg_tgamma(simd_float4 x) {
46214620}
46224621#endif
46234622
4624#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4623#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
46254624extern simd_float8 _simd_tgamma_f8(simd_float8 x);
46264625static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x) {
46274626 return _simd_tgamma_f8(x);
......@@ -4632,7 +4631,7 @@ static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x) {
46324631}
46334632#endif
46344633
4635#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4634#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
46364635extern simd_float16 _simd_tgamma_f16(simd_float16 x);
46374636static inline SIMD_CFUNC simd_float16 __tg_tgamma(simd_float16 x) {
46384637 return _simd_tgamma_f16(x);
......@@ -4658,7 +4657,7 @@ static inline SIMD_CFUNC simd_double3 __tg_tgamma(simd_double3 x) {
46584657 return simd_make_double3(__tg_tgamma(simd_make_double4(x)));
46594658}
46604659
4661#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4660#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
46624661extern simd_double4 _simd_tgamma_d4(simd_double4 x);
46634662static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x) {
46644663 return _simd_tgamma_d4(x);
......@@ -4669,7 +4668,7 @@ static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x) {
46694668}
46704669#endif
46714670
4672#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4671#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
46734672extern simd_double8 _simd_tgamma_d8(simd_double8 x);
46744673static inline SIMD_CFUNC simd_double8 __tg_tgamma(simd_double8 x) {
46754674 return _simd_tgamma_d8(x);
......@@ -4704,7 +4703,7 @@ static inline SIMD_CFUNC simd_float4 __tg_round(simd_float4 x) {
47044703}
47054704#endif
47064705
4707#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4706#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
47084707extern simd_float8 _simd_round_f8(simd_float8 x);
47094708static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x) {
47104709 return _simd_round_f8(x);
......@@ -4715,7 +4714,7 @@ static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x) {
47154714}
47164715#endif
47174716
4718#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4717#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
47194718extern simd_float16 _simd_round_f16(simd_float16 x);
47204719static inline SIMD_CFUNC simd_float16 __tg_round(simd_float16 x) {
47214720 return _simd_round_f16(x);
......@@ -4745,7 +4744,7 @@ static inline SIMD_CFUNC simd_double3 __tg_round(simd_double3 x) {
47454744 return simd_make_double3(__tg_round(simd_make_double4(x)));
47464745}
47474746
4748#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4747#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
47494748extern simd_double4 _simd_round_d4(simd_double4 x);
47504749static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x) {
47514750 return _simd_round_d4(x);
......@@ -4756,7 +4755,7 @@ static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x) {
47564755}
47574756#endif
47584757
4759#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4758#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
47604759extern simd_double8 _simd_round_d8(simd_double8 x);
47614760static inline SIMD_CFUNC simd_double8 __tg_round(simd_double8 x) {
47624761 return _simd_round_d8(x);
......@@ -4787,7 +4786,7 @@ static inline SIMD_CFUNC simd_float4 __tg_atan2(simd_float4 y, simd_float4 x) {
47874786}
47884787#endif
47894788
4790#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4789#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
47914790extern simd_float8 _simd_atan2_f8(simd_float8 y, simd_float8 x);
47924791static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x) {
47934792 return _simd_atan2_f8(y, x);
......@@ -4798,7 +4797,7 @@ static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x) {
47984797}
47994798#endif
48004799
4801#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4800#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
48024801extern simd_float16 _simd_atan2_f16(simd_float16 y, simd_float16 x);
48034802static inline SIMD_CFUNC simd_float16 __tg_atan2(simd_float16 y, simd_float16 x) {
48044803 return _simd_atan2_f16(y, x);
......@@ -4824,7 +4823,7 @@ static inline SIMD_CFUNC simd_double3 __tg_atan2(simd_double3 y, simd_double3 x)
48244823 return simd_make_double3(__tg_atan2(simd_make_double4(y), simd_make_double4(x)));
48254824}
48264825
4827#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4826#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
48284827extern simd_double4 _simd_atan2_d4(simd_double4 y, simd_double4 x);
48294828static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x) {
48304829 return _simd_atan2_d4(y, x);
......@@ -4835,7 +4834,7 @@ static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x)
48354834}
48364835#endif
48374836
4838#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4837#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
48394838extern simd_double8 _simd_atan2_d8(simd_double8 y, simd_double8 x);
48404839static inline SIMD_CFUNC simd_double8 __tg_atan2(simd_double8 y, simd_double8 x) {
48414840 return _simd_atan2_d8(y, x);
......@@ -4866,7 +4865,7 @@ static inline SIMD_CFUNC simd_float4 __tg_hypot(simd_float4 x, simd_float4 y) {
48664865}
48674866#endif
48684867
4869#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4868#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
48704869extern simd_float8 _simd_hypot_f8(simd_float8 x, simd_float8 y);
48714870static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y) {
48724871 return _simd_hypot_f8(x, y);
......@@ -4877,7 +4876,7 @@ static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y) {
48774876}
48784877#endif
48794878
4880#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4879#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
48814880extern simd_float16 _simd_hypot_f16(simd_float16 x, simd_float16 y);
48824881static inline SIMD_CFUNC simd_float16 __tg_hypot(simd_float16 x, simd_float16 y) {
48834882 return _simd_hypot_f16(x, y);
......@@ -4903,7 +4902,7 @@ static inline SIMD_CFUNC simd_double3 __tg_hypot(simd_double3 x, simd_double3 y)
49034902 return simd_make_double3(__tg_hypot(simd_make_double4(x), simd_make_double4(y)));
49044903}
49054904
4906#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4905#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
49074906extern simd_double4 _simd_hypot_d4(simd_double4 x, simd_double4 y);
49084907static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y) {
49094908 return _simd_hypot_d4(x, y);
......@@ -4914,7 +4913,7 @@ static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y)
49144913}
49154914#endif
49164915
4917#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4916#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
49184917extern simd_double8 _simd_hypot_d8(simd_double8 x, simd_double8 y);
49194918static inline SIMD_CFUNC simd_double8 __tg_hypot(simd_double8 x, simd_double8 y) {
49204919 return _simd_hypot_d8(x, y);
......@@ -4945,7 +4944,7 @@ static inline SIMD_CFUNC simd_float4 __tg_pow(simd_float4 x, simd_float4 y) {
49454944}
49464945#endif
49474946
4948#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4947#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
49494948extern simd_float8 _simd_pow_f8(simd_float8 x, simd_float8 y);
49504949static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y) {
49514950 return _simd_pow_f8(x, y);
......@@ -4956,7 +4955,7 @@ static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y) {
49564955}
49574956#endif
49584957
4959#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4958#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
49604959extern simd_float16 _simd_pow_f16(simd_float16 x, simd_float16 y);
49614960static inline SIMD_CFUNC simd_float16 __tg_pow(simd_float16 x, simd_float16 y) {
49624961 return _simd_pow_f16(x, y);
......@@ -4982,7 +4981,7 @@ static inline SIMD_CFUNC simd_double3 __tg_pow(simd_double3 x, simd_double3 y) {
49824981 return simd_make_double3(__tg_pow(simd_make_double4(x), simd_make_double4(y)));
49834982}
49844983
4985#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
4984#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
49864985extern simd_double4 _simd_pow_d4(simd_double4 x, simd_double4 y);
49874986static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y) {
49884987 return _simd_pow_d4(x, y);
......@@ -4993,7 +4992,7 @@ static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y) {
49934992}
49944993#endif
49954994
4996#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
4995#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
49974996extern simd_double8 _simd_pow_d8(simd_double8 x, simd_double8 y);
49984997static inline SIMD_CFUNC simd_double8 __tg_pow(simd_double8 x, simd_double8 y) {
49994998 return _simd_pow_d8(x, y);
......@@ -5024,7 +5023,7 @@ static inline SIMD_CFUNC simd_float4 __tg_fmod(simd_float4 x, simd_float4 y) {
50245023}
50255024#endif
50265025
5027#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
5026#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
50285027extern simd_float8 _simd_fmod_f8(simd_float8 x, simd_float8 y);
50295028static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y) {
50305029 return _simd_fmod_f8(x, y);
......@@ -5035,7 +5034,7 @@ static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y) {
50355034}
50365035#endif
50375036
5038#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
5037#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
50395038extern simd_float16 _simd_fmod_f16(simd_float16 x, simd_float16 y);
50405039static inline SIMD_CFUNC simd_float16 __tg_fmod(simd_float16 x, simd_float16 y) {
50415040 return _simd_fmod_f16(x, y);
......@@ -5061,7 +5060,7 @@ static inline SIMD_CFUNC simd_double3 __tg_fmod(simd_double3 x, simd_double3 y)
50615060 return simd_make_double3(__tg_fmod(simd_make_double4(x), simd_make_double4(y)));
50625061}
50635062
5064#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
5063#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
50655064extern simd_double4 _simd_fmod_d4(simd_double4 x, simd_double4 y);
50665065static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y) {
50675066 return _simd_fmod_d4(x, y);
......@@ -5072,7 +5071,7 @@ static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y)
50725071}
50735072#endif
50745073
5075#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
5074#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
50765075extern simd_double8 _simd_fmod_d8(simd_double8 x, simd_double8 y);
50775076static inline SIMD_CFUNC simd_double8 __tg_fmod(simd_double8 x, simd_double8 y) {
50785077 return _simd_fmod_d8(x, y);
......@@ -5103,7 +5102,7 @@ static inline SIMD_CFUNC simd_float4 __tg_remainder(simd_float4 x, simd_float4 y
51035102}
51045103#endif
51055104
5106#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
5105#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
51075106extern simd_float8 _simd_remainder_f8(simd_float8 x, simd_float8 y);
51085107static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y) {
51095108 return _simd_remainder_f8(x, y);
......@@ -5114,7 +5113,7 @@ static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y
51145113}
51155114#endif
51165115
5117#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
5116#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
51185117extern simd_float16 _simd_remainder_f16(simd_float16 x, simd_float16 y);
51195118static inline SIMD_CFUNC simd_float16 __tg_remainder(simd_float16 x, simd_float16 y) {
51205119 return _simd_remainder_f16(x, y);
......@@ -5140,7 +5139,7 @@ static inline SIMD_CFUNC simd_double3 __tg_remainder(simd_double3 x, simd_double
51405139 return simd_make_double3(__tg_remainder(simd_make_double4(x), simd_make_double4(y)));
51415140}
51425141
5143#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
5142#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
51445143extern simd_double4 _simd_remainder_d4(simd_double4 x, simd_double4 y);
51455144static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double4 y) {
51465145 return _simd_remainder_d4(x, y);
......@@ -5151,7 +5150,7 @@ static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double
51515150}
51525151#endif
51535152
5154#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
5153#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
51555154extern simd_double8 _simd_remainder_d8(simd_double8 x, simd_double8 y);
51565155static inline SIMD_CFUNC simd_double8 __tg_remainder(simd_double8 x, simd_double8 y) {
51575156 return _simd_remainder_d8(x, y);
......@@ -5182,7 +5181,7 @@ static inline SIMD_CFUNC simd_float4 __tg_nextafter(simd_float4 x, simd_float4 y
51825181}
51835182#endif
51845183
5185#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
5184#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
51865185extern simd_float8 _simd_nextafter_f8(simd_float8 x, simd_float8 y);
51875186static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y) {
51885187 return _simd_nextafter_f8(x, y);
......@@ -5193,7 +5192,7 @@ static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y
51935192}
51945193#endif
51955194
5196#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
5195#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
51975196extern simd_float16 _simd_nextafter_f16(simd_float16 x, simd_float16 y);
51985197static inline SIMD_CFUNC simd_float16 __tg_nextafter(simd_float16 x, simd_float16 y) {
51995198 return _simd_nextafter_f16(x, y);
......@@ -5219,7 +5218,7 @@ static inline SIMD_CFUNC simd_double3 __tg_nextafter(simd_double3 x, simd_double
52195218 return simd_make_double3(__tg_nextafter(simd_make_double4(x), simd_make_double4(y)));
52205219}
52215220
5222#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__
5221#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
52235222extern simd_double4 _simd_nextafter_d4(simd_double4 x, simd_double4 y);
52245223static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double4 y) {
52255224 return _simd_nextafter_d4(x, y);
......@@ -5230,7 +5229,7 @@ static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double
52305229}
52315230#endif
52325231
5233#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__
5232#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
52345233extern simd_double8 _simd_nextafter_d8(simd_double8 x, simd_double8 y);
52355234static inline SIMD_CFUNC simd_double8 __tg_nextafter(simd_double8 x, simd_double8 y) {
52365235 return _simd_nextafter_d8(x, y);
......@@ -5287,7 +5286,7 @@ static inline SIMD_CFUNC simd_float8 __tg_fma(simd_float8 x, simd_float8 y, simd
52875286}
52885287
52895288static inline SIMD_CFUNC simd_float16 __tg_fma(simd_float16 x, simd_float16 y, simd_float16 z) {
5290#if defined __x86_64__ && defined __AVX512F__
5289#if defined __AVX512F__
52915290 return _mm512_fmadd_ps(x, y, z);
52925291#else
52935292 return simd_make_float16(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi));
......@@ -5322,7 +5321,7 @@ static inline SIMD_CFUNC simd_double4 __tg_fma(simd_double4 x, simd_double4 y, s
53225321}
53235322
53245323static inline SIMD_CFUNC simd_double8 __tg_fma(simd_double8 x, simd_double8 y, simd_double8 z) {
5325#if defined __x86_64__ && defined __AVX512F__
5324#if defined __AVX512F__
53265325 return _mm512_fmadd_pd(x, y, z);
53275326#else
53285327 return simd_make_double8(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi));
lib/libc/include/x86_64-macos-gnu/simd/packed.h+122-122
......@@ -35,22 +35,22 @@
3535/*! @abstract A vector of two 8-bit signed (twos-complement) integers with
3636 * relaxed alignment.
3737 * @description In C++ and Metal, this type is also available as
38 * simd::packed::char2. The alignment of this type is that of the
39 * underlying scalar element type, so you can use it to load or store from
40 * an array of that type. */
38 * simd::packed_char2. The alignment of this type is that of the underlying
39 * scalar element type, so you can use it to load or store from an array of
40 * that type. */
4141typedef __attribute__((__ext_vector_type__(2),__aligned__(1))) char simd_packed_char2;
4242
4343/*! @abstract A vector of four 8-bit signed (twos-complement) integers with
4444 * relaxed alignment.
4545 * @description In C++ and Metal, this type is also available as
46 * simd::packed::char4. The alignment of this type is that of the
47 * underlying scalar element type, so you can use it to load or store from
48 * an array of that type. */
46 * simd::packed_char4. The alignment of this type is that of the underlying
47 * scalar element type, so you can use it to load or store from an array of
48 * that type. */
4949typedef __attribute__((__ext_vector_type__(4),__aligned__(1))) char simd_packed_char4;
5050
5151/*! @abstract A vector of eight 8-bit signed (twos-complement) integers with
5252 * relaxed alignment.
53 * @description In C++ this type is also available as simd::packed::char8.
53 * @description In C++ this type is also available as simd::packed_char8.
5454 * This type is not available in Metal. The alignment of this type is only
5555 * that of the underlying scalar element type, so you can use it to load or
5656 * store from an array of that type. */
......@@ -58,7 +58,7 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(1))) char simd_packed_
5858
5959/*! @abstract A vector of sixteen 8-bit signed (twos-complement) integers
6060 * with relaxed alignment.
61 * @description In C++ this type is also available as simd::packed::char16.
61 * @description In C++ this type is also available as simd::packed_char16.
6262 * This type is not available in Metal. The alignment of this type is only
6363 * that of the underlying scalar element type, so you can use it to load or
6464 * store from an array of that type. */
......@@ -66,7 +66,7 @@ typedef __attribute__((__ext_vector_type__(16),__aligned__(1))) char simd_packed
6666
6767/*! @abstract A vector of thirty-two 8-bit signed (twos-complement) integers
6868 * with relaxed alignment.
69 * @description In C++ this type is also available as simd::packed::char32.
69 * @description In C++ this type is also available as simd::packed_char32.
7070 * This type is not available in Metal. The alignment of this type is only
7171 * that of the underlying scalar element type, so you can use it to load or
7272 * store from an array of that type. */
......@@ -74,7 +74,7 @@ typedef __attribute__((__ext_vector_type__(32),__aligned__(1))) char simd_packed
7474
7575/*! @abstract A vector of sixty-four 8-bit signed (twos-complement) integers
7676 * with relaxed alignment.
77 * @description In C++ this type is also available as simd::packed::char64.
77 * @description In C++ this type is also available as simd::packed_char64.
7878 * This type is not available in Metal. The alignment of this type is only
7979 * that of the underlying scalar element type, so you can use it to load or
8080 * store from an array of that type. */
......@@ -83,7 +83,7 @@ typedef __attribute__((__ext_vector_type__(64),__aligned__(1))) char simd_packed
8383/*! @abstract A vector of two 8-bit unsigned integers with relaxed
8484 * alignment.
8585 * @description In C++ and Metal, this type is also available as
86 * simd::packed::uchar2. The alignment of this type is that of the
86 * simd::packed_uchar2. The alignment of this type is that of the
8787 * underlying scalar element type, so you can use it to load or store from
8888 * an array of that type. */
8989typedef __attribute__((__ext_vector_type__(2),__aligned__(1))) unsigned char simd_packed_uchar2;
......@@ -91,14 +91,14 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(1))) unsigned char sim
9191/*! @abstract A vector of four 8-bit unsigned integers with relaxed
9292 * alignment.
9393 * @description In C++ and Metal, this type is also available as
94 * simd::packed::uchar4. The alignment of this type is that of the
94 * simd::packed_uchar4. The alignment of this type is that of the
9595 * underlying scalar element type, so you can use it to load or store from
9696 * an array of that type. */
9797typedef __attribute__((__ext_vector_type__(4),__aligned__(1))) unsigned char simd_packed_uchar4;
9898
9999/*! @abstract A vector of eight 8-bit unsigned integers with relaxed
100100 * alignment.
101 * @description In C++ this type is also available as simd::packed::uchar8.
101 * @description In C++ this type is also available as simd::packed_uchar8.
102102 * This type is not available in Metal. The alignment of this type is only
103103 * that of the underlying scalar element type, so you can use it to load or
104104 * store from an array of that type. */
......@@ -106,32 +106,32 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(1))) unsigned char sim
106106
107107/*! @abstract A vector of sixteen 8-bit unsigned integers with relaxed
108108 * alignment.
109 * @description In C++ this type is also available as
110 * simd::packed::uchar16. This type is not available in Metal. The
111 * alignment of this type is only that of the underlying scalar element
112 * type, so you can use it to load or store from an array of that type. */
109 * @description In C++ this type is also available as simd::packed_uchar16.
110 * This type is not available in Metal. The alignment of this type is only
111 * that of the underlying scalar element type, so you can use it to load or
112 * store from an array of that type. */
113113typedef __attribute__((__ext_vector_type__(16),__aligned__(1))) unsigned char simd_packed_uchar16;
114114
115115/*! @abstract A vector of thirty-two 8-bit unsigned integers with relaxed
116116 * alignment.
117 * @description In C++ this type is also available as
118 * simd::packed::uchar32. This type is not available in Metal. The
119 * alignment of this type is only that of the underlying scalar element
120 * type, so you can use it to load or store from an array of that type. */
117 * @description In C++ this type is also available as simd::packed_uchar32.
118 * This type is not available in Metal. The alignment of this type is only
119 * that of the underlying scalar element type, so you can use it to load or
120 * store from an array of that type. */
121121typedef __attribute__((__ext_vector_type__(32),__aligned__(1))) unsigned char simd_packed_uchar32;
122122
123123/*! @abstract A vector of sixty-four 8-bit unsigned integers with relaxed
124124 * alignment.
125 * @description In C++ this type is also available as
126 * simd::packed::uchar64. This type is not available in Metal. The
127 * alignment of this type is only that of the underlying scalar element
128 * type, so you can use it to load or store from an array of that type. */
125 * @description In C++ this type is also available as simd::packed_uchar64.
126 * This type is not available in Metal. The alignment of this type is only
127 * that of the underlying scalar element type, so you can use it to load or
128 * store from an array of that type. */
129129typedef __attribute__((__ext_vector_type__(64),__aligned__(1))) unsigned char simd_packed_uchar64;
130130
131131/*! @abstract A vector of two 16-bit signed (twos-complement) integers with
132132 * relaxed alignment.
133133 * @description In C++ and Metal, this type is also available as
134 * simd::packed::short2. The alignment of this type is that of the
134 * simd::packed_short2. The alignment of this type is that of the
135135 * underlying scalar element type, so you can use it to load or store from
136136 * an array of that type. */
137137typedef __attribute__((__ext_vector_type__(2),__aligned__(2))) short simd_packed_short2;
......@@ -139,14 +139,14 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(2))) short simd_packed
139139/*! @abstract A vector of four 16-bit signed (twos-complement) integers with
140140 * relaxed alignment.
141141 * @description In C++ and Metal, this type is also available as
142 * simd::packed::short4. The alignment of this type is that of the
142 * simd::packed_short4. The alignment of this type is that of the
143143 * underlying scalar element type, so you can use it to load or store from
144144 * an array of that type. */
145145typedef __attribute__((__ext_vector_type__(4),__aligned__(2))) short simd_packed_short4;
146146
147147/*! @abstract A vector of eight 16-bit signed (twos-complement) integers
148148 * with relaxed alignment.
149 * @description In C++ this type is also available as simd::packed::short8.
149 * @description In C++ this type is also available as simd::packed_short8.
150150 * This type is not available in Metal. The alignment of this type is only
151151 * that of the underlying scalar element type, so you can use it to load or
152152 * store from an array of that type. */
......@@ -154,24 +154,24 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(2))) short simd_packed
154154
155155/*! @abstract A vector of sixteen 16-bit signed (twos-complement) integers
156156 * with relaxed alignment.
157 * @description In C++ this type is also available as
158 * simd::packed::short16. This type is not available in Metal. The
159 * alignment of this type is only that of the underlying scalar element
160 * type, so you can use it to load or store from an array of that type. */
157 * @description In C++ this type is also available as simd::packed_short16.
158 * This type is not available in Metal. The alignment of this type is only
159 * that of the underlying scalar element type, so you can use it to load or
160 * store from an array of that type. */
161161typedef __attribute__((__ext_vector_type__(16),__aligned__(2))) short simd_packed_short16;
162162
163163/*! @abstract A vector of thirty-two 16-bit signed (twos-complement)
164164 * integers with relaxed alignment.
165 * @description In C++ this type is also available as
166 * simd::packed::short32. This type is not available in Metal. The
167 * alignment of this type is only that of the underlying scalar element
168 * type, so you can use it to load or store from an array of that type. */
165 * @description In C++ this type is also available as simd::packed_short32.
166 * This type is not available in Metal. The alignment of this type is only
167 * that of the underlying scalar element type, so you can use it to load or
168 * store from an array of that type. */
169169typedef __attribute__((__ext_vector_type__(32),__aligned__(2))) short simd_packed_short32;
170170
171171/*! @abstract A vector of two 16-bit unsigned integers with relaxed
172172 * alignment.
173173 * @description In C++ and Metal, this type is also available as
174 * simd::packed::ushort2. The alignment of this type is that of the
174 * simd::packed_ushort2. The alignment of this type is that of the
175175 * underlying scalar element type, so you can use it to load or store from
176176 * an array of that type. */
177177typedef __attribute__((__ext_vector_type__(2),__aligned__(2))) unsigned short simd_packed_ushort2;
......@@ -179,23 +179,23 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(2))) unsigned short si
179179/*! @abstract A vector of four 16-bit unsigned integers with relaxed
180180 * alignment.
181181 * @description In C++ and Metal, this type is also available as
182 * simd::packed::ushort4. The alignment of this type is that of the
182 * simd::packed_ushort4. The alignment of this type is that of the
183183 * underlying scalar element type, so you can use it to load or store from
184184 * an array of that type. */
185185typedef __attribute__((__ext_vector_type__(4),__aligned__(2))) unsigned short simd_packed_ushort4;
186186
187187/*! @abstract A vector of eight 16-bit unsigned integers with relaxed
188188 * alignment.
189 * @description In C++ this type is also available as
190 * simd::packed::ushort8. This type is not available in Metal. The
191 * alignment of this type is only that of the underlying scalar element
192 * type, so you can use it to load or store from an array of that type. */
189 * @description In C++ this type is also available as simd::packed_ushort8.
190 * This type is not available in Metal. The alignment of this type is only
191 * that of the underlying scalar element type, so you can use it to load or
192 * store from an array of that type. */
193193typedef __attribute__((__ext_vector_type__(8),__aligned__(2))) unsigned short simd_packed_ushort8;
194194
195195/*! @abstract A vector of sixteen 16-bit unsigned integers with relaxed
196196 * alignment.
197197 * @description In C++ this type is also available as
198 * simd::packed::ushort16. This type is not available in Metal. The
198 * simd::packed_ushort16. This type is not available in Metal. The
199199 * alignment of this type is only that of the underlying scalar element
200200 * type, so you can use it to load or store from an array of that type. */
201201typedef __attribute__((__ext_vector_type__(16),__aligned__(2))) unsigned short simd_packed_ushort16;
......@@ -203,7 +203,7 @@ typedef __attribute__((__ext_vector_type__(16),__aligned__(2))) unsigned short s
203203/*! @abstract A vector of thirty-two 16-bit unsigned integers with relaxed
204204 * alignment.
205205 * @description In C++ this type is also available as
206 * simd::packed::ushort32. This type is not available in Metal. The
206 * simd::packed_ushort32. This type is not available in Metal. The
207207 * alignment of this type is only that of the underlying scalar element
208208 * type, so you can use it to load or store from an array of that type. */
209209typedef __attribute__((__ext_vector_type__(32),__aligned__(2))) unsigned short simd_packed_ushort32;
......@@ -211,7 +211,7 @@ typedef __attribute__((__ext_vector_type__(32),__aligned__(2))) unsigned short s
211211/*! @abstract A vector of two 32-bit signed (twos-complement) integers with
212212 * relaxed alignment.
213213 * @description In C++ and Metal, this type is also available as
214 * simd::packed::int2. The alignment of this type is that of the underlying
214 * simd::packed_int2. The alignment of this type is that of the underlying
215215 * scalar element type, so you can use it to load or store from an array of
216216 * that type. */
217217typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) int simd_packed_int2;
......@@ -219,14 +219,14 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) int simd_packed_i
219219/*! @abstract A vector of four 32-bit signed (twos-complement) integers with
220220 * relaxed alignment.
221221 * @description In C++ and Metal, this type is also available as
222 * simd::packed::int4. The alignment of this type is that of the underlying
222 * simd::packed_int4. The alignment of this type is that of the underlying
223223 * scalar element type, so you can use it to load or store from an array of
224224 * that type. */
225225typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) int simd_packed_int4;
226226
227227/*! @abstract A vector of eight 32-bit signed (twos-complement) integers
228228 * with relaxed alignment.
229 * @description In C++ this type is also available as simd::packed::int8.
229 * @description In C++ this type is also available as simd::packed_int8.
230230 * This type is not available in Metal. The alignment of this type is only
231231 * that of the underlying scalar element type, so you can use it to load or
232232 * store from an array of that type. */
......@@ -234,7 +234,7 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(4))) int simd_packed_i
234234
235235/*! @abstract A vector of sixteen 32-bit signed (twos-complement) integers
236236 * with relaxed alignment.
237 * @description In C++ this type is also available as simd::packed::int16.
237 * @description In C++ this type is also available as simd::packed_int16.
238238 * This type is not available in Metal. The alignment of this type is only
239239 * that of the underlying scalar element type, so you can use it to load or
240240 * store from an array of that type. */
......@@ -243,22 +243,22 @@ typedef __attribute__((__ext_vector_type__(16),__aligned__(4))) int simd_packed_
243243/*! @abstract A vector of two 32-bit unsigned integers with relaxed
244244 * alignment.
245245 * @description In C++ and Metal, this type is also available as
246 * simd::packed::uint2. The alignment of this type is that of the
247 * underlying scalar element type, so you can use it to load or store from
248 * an array of that type. */
246 * simd::packed_uint2. The alignment of this type is that of the underlying
247 * scalar element type, so you can use it to load or store from an array of
248 * that type. */
249249typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) unsigned int simd_packed_uint2;
250250
251251/*! @abstract A vector of four 32-bit unsigned integers with relaxed
252252 * alignment.
253253 * @description In C++ and Metal, this type is also available as
254 * simd::packed::uint4. The alignment of this type is that of the
255 * underlying scalar element type, so you can use it to load or store from
256 * an array of that type. */
254 * simd::packed_uint4. The alignment of this type is that of the underlying
255 * scalar element type, so you can use it to load or store from an array of
256 * that type. */
257257typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) unsigned int simd_packed_uint4;
258258
259259/*! @abstract A vector of eight 32-bit unsigned integers with relaxed
260260 * alignment.
261 * @description In C++ this type is also available as simd::packed::uint8.
261 * @description In C++ this type is also available as simd::packed_uint8.
262262 * This type is not available in Metal. The alignment of this type is only
263263 * that of the underlying scalar element type, so you can use it to load or
264264 * store from an array of that type. */
......@@ -266,7 +266,7 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(4))) unsigned int simd
266266
267267/*! @abstract A vector of sixteen 32-bit unsigned integers with relaxed
268268 * alignment.
269 * @description In C++ this type is also available as simd::packed::uint16.
269 * @description In C++ this type is also available as simd::packed_uint16.
270270 * This type is not available in Metal. The alignment of this type is only
271271 * that of the underlying scalar element type, so you can use it to load or
272272 * store from an array of that type. */
......@@ -275,7 +275,7 @@ typedef __attribute__((__ext_vector_type__(16),__aligned__(4))) unsigned int sim
275275/*! @abstract A vector of two 32-bit floating-point numbers with relaxed
276276 * alignment.
277277 * @description In C++ and Metal, this type is also available as
278 * simd::packed::float2. The alignment of this type is that of the
278 * simd::packed_float2. The alignment of this type is that of the
279279 * underlying scalar element type, so you can use it to load or store from
280280 * an array of that type. */
281281typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) float simd_packed_float2;
......@@ -283,14 +283,14 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) float simd_packed
283283/*! @abstract A vector of four 32-bit floating-point numbers with relaxed
284284 * alignment.
285285 * @description In C++ and Metal, this type is also available as
286 * simd::packed::float4. The alignment of this type is that of the
286 * simd::packed_float4. The alignment of this type is that of the
287287 * underlying scalar element type, so you can use it to load or store from
288288 * an array of that type. */
289289typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) float simd_packed_float4;
290290
291291/*! @abstract A vector of eight 32-bit floating-point numbers with relaxed
292292 * alignment.
293 * @description In C++ this type is also available as simd::packed::float8.
293 * @description In C++ this type is also available as simd::packed_float8.
294294 * This type is not available in Metal. The alignment of this type is only
295295 * that of the underlying scalar element type, so you can use it to load or
296296 * store from an array of that type. */
......@@ -298,18 +298,18 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(4))) float simd_packed
298298
299299/*! @abstract A vector of sixteen 32-bit floating-point numbers with relaxed
300300 * alignment.
301 * @description In C++ this type is also available as
302 * simd::packed::float16. This type is not available in Metal. The
303 * alignment of this type is only that of the underlying scalar element
304 * type, so you can use it to load or store from an array of that type. */
301 * @description In C++ this type is also available as simd::packed_float16.
302 * This type is not available in Metal. The alignment of this type is only
303 * that of the underlying scalar element type, so you can use it to load or
304 * store from an array of that type. */
305305typedef __attribute__((__ext_vector_type__(16),__aligned__(4))) float simd_packed_float16;
306306
307307/*! @abstract A vector of two 64-bit signed (twos-complement) integers with
308308 * relaxed alignment.
309309 * @description In C++ and Metal, this type is also available as
310 * simd::packed::long2. The alignment of this type is that of the
311 * underlying scalar element type, so you can use it to load or store from
312 * an array of that type. */
310 * simd::packed_long2. The alignment of this type is that of the underlying
311 * scalar element type, so you can use it to load or store from an array of
312 * that type. */
313313#if defined __LP64__
314314typedef __attribute__((__ext_vector_type__(2),__aligned__(8))) simd_long1 simd_packed_long2;
315315#else
......@@ -319,9 +319,9 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) simd_long1 simd_p
319319/*! @abstract A vector of four 64-bit signed (twos-complement) integers with
320320 * relaxed alignment.
321321 * @description In C++ and Metal, this type is also available as
322 * simd::packed::long4. The alignment of this type is that of the
323 * underlying scalar element type, so you can use it to load or store from
324 * an array of that type. */
322 * simd::packed_long4. The alignment of this type is that of the underlying
323 * scalar element type, so you can use it to load or store from an array of
324 * that type. */
325325#if defined __LP64__
326326typedef __attribute__((__ext_vector_type__(4),__aligned__(8))) simd_long1 simd_packed_long4;
327327#else
......@@ -330,7 +330,7 @@ typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) simd_long1 simd_p
330330
331331/*! @abstract A vector of eight 64-bit signed (twos-complement) integers
332332 * with relaxed alignment.
333 * @description In C++ this type is also available as simd::packed::long8.
333 * @description In C++ this type is also available as simd::packed_long8.
334334 * This type is not available in Metal. The alignment of this type is only
335335 * that of the underlying scalar element type, so you can use it to load or
336336 * store from an array of that type. */
......@@ -343,7 +343,7 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(4))) simd_long1 simd_p
343343/*! @abstract A vector of two 64-bit unsigned integers with relaxed
344344 * alignment.
345345 * @description In C++ and Metal, this type is also available as
346 * simd::packed::ulong2. The alignment of this type is that of the
346 * simd::packed_ulong2. The alignment of this type is that of the
347347 * underlying scalar element type, so you can use it to load or store from
348348 * an array of that type. */
349349#if defined __LP64__
......@@ -355,7 +355,7 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) simd_ulong1 simd_
355355/*! @abstract A vector of four 64-bit unsigned integers with relaxed
356356 * alignment.
357357 * @description In C++ and Metal, this type is also available as
358 * simd::packed::ulong4. The alignment of this type is that of the
358 * simd::packed_ulong4. The alignment of this type is that of the
359359 * underlying scalar element type, so you can use it to load or store from
360360 * an array of that type. */
361361#if defined __LP64__
......@@ -366,7 +366,7 @@ typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) simd_ulong1 simd_
366366
367367/*! @abstract A vector of eight 64-bit unsigned integers with relaxed
368368 * alignment.
369 * @description In C++ this type is also available as simd::packed::ulong8.
369 * @description In C++ this type is also available as simd::packed_ulong8.
370370 * This type is not available in Metal. The alignment of this type is only
371371 * that of the underlying scalar element type, so you can use it to load or
372372 * store from an array of that type. */
......@@ -379,7 +379,7 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(4))) simd_ulong1 simd_
379379/*! @abstract A vector of two 64-bit floating-point numbers with relaxed
380380 * alignment.
381381 * @description In C++ and Metal, this type is also available as
382 * simd::packed::double2. The alignment of this type is that of the
382 * simd::packed_double2. The alignment of this type is that of the
383383 * underlying scalar element type, so you can use it to load or store from
384384 * an array of that type. */
385385#if defined __LP64__
......@@ -391,7 +391,7 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) double simd_packe
391391/*! @abstract A vector of four 64-bit floating-point numbers with relaxed
392392 * alignment.
393393 * @description In C++ and Metal, this type is also available as
394 * simd::packed::double4. The alignment of this type is that of the
394 * simd::packed_double4. The alignment of this type is that of the
395395 * underlying scalar element type, so you can use it to load or store from
396396 * an array of that type. */
397397#if defined __LP64__
......@@ -402,10 +402,10 @@ typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) double simd_packe
402402
403403/*! @abstract A vector of eight 64-bit floating-point numbers with relaxed
404404 * alignment.
405 * @description In C++ this type is also available as
406 * simd::packed::double8. This type is not available in Metal. The
407 * alignment of this type is only that of the underlying scalar element
408 * type, so you can use it to load or store from an array of that type. */
405 * @description In C++ this type is also available as simd::packed_double8.
406 * This type is not available in Metal. The alignment of this type is only
407 * that of the underlying scalar element type, so you can use it to load or
408 * store from an array of that type. */
409409#if defined __LP64__
410410typedef __attribute__((__ext_vector_type__(8),__aligned__(8))) double simd_packed_double8;
411411#else
......@@ -772,259 +772,259 @@ typedef ::simd_packed_double8 double8;
772772/*! @abstract A vector of two 8-bit signed (twos-complement) integers with
773773 * relaxed alignment.
774774 * @description This type is deprecated; you should use simd_packed_char2
775 * or simd::packed::char2 instead. */
775 * or simd::packed_char2 instead. */
776776typedef simd_packed_char2 packed_char2;
777777
778778/*! @abstract A vector of four 8-bit signed (twos-complement) integers with
779779 * relaxed alignment.
780780 * @description This type is deprecated; you should use simd_packed_char4
781 * or simd::packed::char4 instead. */
781 * or simd::packed_char4 instead. */
782782typedef simd_packed_char4 packed_char4;
783783
784784/*! @abstract A vector of eight 8-bit signed (twos-complement) integers with
785785 * relaxed alignment.
786786 * @description This type is deprecated; you should use simd_packed_char8
787 * or simd::packed::char8 instead. */
787 * or simd::packed_char8 instead. */
788788typedef simd_packed_char8 packed_char8;
789789
790790/*! @abstract A vector of sixteen 8-bit signed (twos-complement) integers
791791 * with relaxed alignment.
792792 * @description This type is deprecated; you should use simd_packed_char16
793 * or simd::packed::char16 instead. */
793 * or simd::packed_char16 instead. */
794794typedef simd_packed_char16 packed_char16;
795795
796796/*! @abstract A vector of thirty-two 8-bit signed (twos-complement) integers
797797 * with relaxed alignment.
798798 * @description This type is deprecated; you should use simd_packed_char32
799 * or simd::packed::char32 instead. */
799 * or simd::packed_char32 instead. */
800800typedef simd_packed_char32 packed_char32;
801801
802802/*! @abstract A vector of sixty-four 8-bit signed (twos-complement) integers
803803 * with relaxed alignment.
804804 * @description This type is deprecated; you should use simd_packed_char64
805 * or simd::packed::char64 instead. */
805 * or simd::packed_char64 instead. */
806806typedef simd_packed_char64 packed_char64;
807807
808808/*! @abstract A vector of two 8-bit unsigned integers with relaxed
809809 * alignment.
810810 * @description This type is deprecated; you should use simd_packed_uchar2
811 * or simd::packed::uchar2 instead. */
811 * or simd::packed_uchar2 instead. */
812812typedef simd_packed_uchar2 packed_uchar2;
813813
814814/*! @abstract A vector of four 8-bit unsigned integers with relaxed
815815 * alignment.
816816 * @description This type is deprecated; you should use simd_packed_uchar4
817 * or simd::packed::uchar4 instead. */
817 * or simd::packed_uchar4 instead. */
818818typedef simd_packed_uchar4 packed_uchar4;
819819
820820/*! @abstract A vector of eight 8-bit unsigned integers with relaxed
821821 * alignment.
822822 * @description This type is deprecated; you should use simd_packed_uchar8
823 * or simd::packed::uchar8 instead. */
823 * or simd::packed_uchar8 instead. */
824824typedef simd_packed_uchar8 packed_uchar8;
825825
826826/*! @abstract A vector of sixteen 8-bit unsigned integers with relaxed
827827 * alignment.
828828 * @description This type is deprecated; you should use simd_packed_uchar16
829 * or simd::packed::uchar16 instead. */
829 * or simd::packed_uchar16 instead. */
830830typedef simd_packed_uchar16 packed_uchar16;
831831
832832/*! @abstract A vector of thirty-two 8-bit unsigned integers with relaxed
833833 * alignment.
834834 * @description This type is deprecated; you should use simd_packed_uchar32
835 * or simd::packed::uchar32 instead. */
835 * or simd::packed_uchar32 instead. */
836836typedef simd_packed_uchar32 packed_uchar32;
837837
838838/*! @abstract A vector of sixty-four 8-bit unsigned integers with relaxed
839839 * alignment.
840840 * @description This type is deprecated; you should use simd_packed_uchar64
841 * or simd::packed::uchar64 instead. */
841 * or simd::packed_uchar64 instead. */
842842typedef simd_packed_uchar64 packed_uchar64;
843843
844844/*! @abstract A vector of two 16-bit signed (twos-complement) integers with
845845 * relaxed alignment.
846846 * @description This type is deprecated; you should use simd_packed_short2
847 * or simd::packed::short2 instead. */
847 * or simd::packed_short2 instead. */
848848typedef simd_packed_short2 packed_short2;
849849
850850/*! @abstract A vector of four 16-bit signed (twos-complement) integers with
851851 * relaxed alignment.
852852 * @description This type is deprecated; you should use simd_packed_short4
853 * or simd::packed::short4 instead. */
853 * or simd::packed_short4 instead. */
854854typedef simd_packed_short4 packed_short4;
855855
856856/*! @abstract A vector of eight 16-bit signed (twos-complement) integers
857857 * with relaxed alignment.
858858 * @description This type is deprecated; you should use simd_packed_short8
859 * or simd::packed::short8 instead. */
859 * or simd::packed_short8 instead. */
860860typedef simd_packed_short8 packed_short8;
861861
862862/*! @abstract A vector of sixteen 16-bit signed (twos-complement) integers
863863 * with relaxed alignment.
864864 * @description This type is deprecated; you should use simd_packed_short16
865 * or simd::packed::short16 instead. */
865 * or simd::packed_short16 instead. */
866866typedef simd_packed_short16 packed_short16;
867867
868868/*! @abstract A vector of thirty-two 16-bit signed (twos-complement)
869869 * integers with relaxed alignment.
870870 * @description This type is deprecated; you should use simd_packed_short32
871 * or simd::packed::short32 instead. */
871 * or simd::packed_short32 instead. */
872872typedef simd_packed_short32 packed_short32;
873873
874874/*! @abstract A vector of two 16-bit unsigned integers with relaxed
875875 * alignment.
876876 * @description This type is deprecated; you should use simd_packed_ushort2
877 * or simd::packed::ushort2 instead. */
877 * or simd::packed_ushort2 instead. */
878878typedef simd_packed_ushort2 packed_ushort2;
879879
880880/*! @abstract A vector of four 16-bit unsigned integers with relaxed
881881 * alignment.
882882 * @description This type is deprecated; you should use simd_packed_ushort4
883 * or simd::packed::ushort4 instead. */
883 * or simd::packed_ushort4 instead. */
884884typedef simd_packed_ushort4 packed_ushort4;
885885
886886/*! @abstract A vector of eight 16-bit unsigned integers with relaxed
887887 * alignment.
888888 * @description This type is deprecated; you should use simd_packed_ushort8
889 * or simd::packed::ushort8 instead. */
889 * or simd::packed_ushort8 instead. */
890890typedef simd_packed_ushort8 packed_ushort8;
891891
892892/*! @abstract A vector of sixteen 16-bit unsigned integers with relaxed
893893 * alignment.
894894 * @description This type is deprecated; you should use
895 * simd_packed_ushort16 or simd::packed::ushort16 instead. */
895 * simd_packed_ushort16 or simd::packed_ushort16 instead. */
896896typedef simd_packed_ushort16 packed_ushort16;
897897
898898/*! @abstract A vector of thirty-two 16-bit unsigned integers with relaxed
899899 * alignment.
900900 * @description This type is deprecated; you should use
901 * simd_packed_ushort32 or simd::packed::ushort32 instead. */
901 * simd_packed_ushort32 or simd::packed_ushort32 instead. */
902902typedef simd_packed_ushort32 packed_ushort32;
903903
904904/*! @abstract A vector of two 32-bit signed (twos-complement) integers with
905905 * relaxed alignment.
906906 * @description This type is deprecated; you should use simd_packed_int2 or
907 * simd::packed::int2 instead. */
907 * simd::packed_int2 instead. */
908908typedef simd_packed_int2 packed_int2;
909909
910910/*! @abstract A vector of four 32-bit signed (twos-complement) integers with
911911 * relaxed alignment.
912912 * @description This type is deprecated; you should use simd_packed_int4 or
913 * simd::packed::int4 instead. */
913 * simd::packed_int4 instead. */
914914typedef simd_packed_int4 packed_int4;
915915
916916/*! @abstract A vector of eight 32-bit signed (twos-complement) integers
917917 * with relaxed alignment.
918918 * @description This type is deprecated; you should use simd_packed_int8 or
919 * simd::packed::int8 instead. */
919 * simd::packed_int8 instead. */
920920typedef simd_packed_int8 packed_int8;
921921
922922/*! @abstract A vector of sixteen 32-bit signed (twos-complement) integers
923923 * with relaxed alignment.
924924 * @description This type is deprecated; you should use simd_packed_int16
925 * or simd::packed::int16 instead. */
925 * or simd::packed_int16 instead. */
926926typedef simd_packed_int16 packed_int16;
927927
928928/*! @abstract A vector of two 32-bit unsigned integers with relaxed
929929 * alignment.
930930 * @description This type is deprecated; you should use simd_packed_uint2
931 * or simd::packed::uint2 instead. */
931 * or simd::packed_uint2 instead. */
932932typedef simd_packed_uint2 packed_uint2;
933933
934934/*! @abstract A vector of four 32-bit unsigned integers with relaxed
935935 * alignment.
936936 * @description This type is deprecated; you should use simd_packed_uint4
937 * or simd::packed::uint4 instead. */
937 * or simd::packed_uint4 instead. */
938938typedef simd_packed_uint4 packed_uint4;
939939
940940/*! @abstract A vector of eight 32-bit unsigned integers with relaxed
941941 * alignment.
942942 * @description This type is deprecated; you should use simd_packed_uint8
943 * or simd::packed::uint8 instead. */
943 * or simd::packed_uint8 instead. */
944944typedef simd_packed_uint8 packed_uint8;
945945
946946/*! @abstract A vector of sixteen 32-bit unsigned integers with relaxed
947947 * alignment.
948948 * @description This type is deprecated; you should use simd_packed_uint16
949 * or simd::packed::uint16 instead. */
949 * or simd::packed_uint16 instead. */
950950typedef simd_packed_uint16 packed_uint16;
951951
952952/*! @abstract A vector of two 32-bit floating-point numbers with relaxed
953953 * alignment.
954954 * @description This type is deprecated; you should use simd_packed_float2
955 * or simd::packed::float2 instead. */
955 * or simd::packed_float2 instead. */
956956typedef simd_packed_float2 packed_float2;
957957
958958/*! @abstract A vector of four 32-bit floating-point numbers with relaxed
959959 * alignment.
960960 * @description This type is deprecated; you should use simd_packed_float4
961 * or simd::packed::float4 instead. */
961 * or simd::packed_float4 instead. */
962962typedef simd_packed_float4 packed_float4;
963963
964964/*! @abstract A vector of eight 32-bit floating-point numbers with relaxed
965965 * alignment.
966966 * @description This type is deprecated; you should use simd_packed_float8
967 * or simd::packed::float8 instead. */
967 * or simd::packed_float8 instead. */
968968typedef simd_packed_float8 packed_float8;
969969
970970/*! @abstract A vector of sixteen 32-bit floating-point numbers with relaxed
971971 * alignment.
972972 * @description This type is deprecated; you should use simd_packed_float16
973 * or simd::packed::float16 instead. */
973 * or simd::packed_float16 instead. */
974974typedef simd_packed_float16 packed_float16;
975975
976976/*! @abstract A vector of two 64-bit signed (twos-complement) integers with
977977 * relaxed alignment.
978978 * @description This type is deprecated; you should use simd_packed_long2
979 * or simd::packed::long2 instead. */
979 * or simd::packed_long2 instead. */
980980typedef simd_packed_long2 packed_long2;
981981
982982/*! @abstract A vector of four 64-bit signed (twos-complement) integers with
983983 * relaxed alignment.
984984 * @description This type is deprecated; you should use simd_packed_long4
985 * or simd::packed::long4 instead. */
985 * or simd::packed_long4 instead. */
986986typedef simd_packed_long4 packed_long4;
987987
988988/*! @abstract A vector of eight 64-bit signed (twos-complement) integers
989989 * with relaxed alignment.
990990 * @description This type is deprecated; you should use simd_packed_long8
991 * or simd::packed::long8 instead. */
991 * or simd::packed_long8 instead. */
992992typedef simd_packed_long8 packed_long8;
993993
994994/*! @abstract A vector of two 64-bit unsigned integers with relaxed
995995 * alignment.
996996 * @description This type is deprecated; you should use simd_packed_ulong2
997 * or simd::packed::ulong2 instead. */
997 * or simd::packed_ulong2 instead. */
998998typedef simd_packed_ulong2 packed_ulong2;
999999
10001000/*! @abstract A vector of four 64-bit unsigned integers with relaxed
10011001 * alignment.
10021002 * @description This type is deprecated; you should use simd_packed_ulong4
1003 * or simd::packed::ulong4 instead. */
1003 * or simd::packed_ulong4 instead. */
10041004typedef simd_packed_ulong4 packed_ulong4;
10051005
10061006/*! @abstract A vector of eight 64-bit unsigned integers with relaxed
10071007 * alignment.
10081008 * @description This type is deprecated; you should use simd_packed_ulong8
1009 * or simd::packed::ulong8 instead. */
1009 * or simd::packed_ulong8 instead. */
10101010typedef simd_packed_ulong8 packed_ulong8;
10111011
10121012/*! @abstract A vector of two 64-bit floating-point numbers with relaxed
10131013 * alignment.
10141014 * @description This type is deprecated; you should use simd_packed_double2
1015 * or simd::packed::double2 instead. */
1015 * or simd::packed_double2 instead. */
10161016typedef simd_packed_double2 packed_double2;
10171017
10181018/*! @abstract A vector of four 64-bit floating-point numbers with relaxed
10191019 * alignment.
10201020 * @description This type is deprecated; you should use simd_packed_double4
1021 * or simd::packed::double4 instead. */
1021 * or simd::packed_double4 instead. */
10221022typedef simd_packed_double4 packed_double4;
10231023
10241024/*! @abstract A vector of eight 64-bit floating-point numbers with relaxed
10251025 * alignment.
10261026 * @description This type is deprecated; you should use simd_packed_double8
1027 * or simd::packed::double8 instead. */
1027 * or simd::packed_double8 instead. */
10281028typedef simd_packed_double8 packed_double8;
10291029
10301030# endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */
lib/libc/include/x86_64-macos-gnu/simd/quaternion.h+4-6
......@@ -435,7 +435,7 @@ static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3 from, simd_float3 to
435435 // Because from and to are more than 90 degrees apart, we compute the
436436 // rotation in two stages (from -> half), (half -> to) to preserve numerical
437437 // accuracy.
438 simd_float3 half = from + to;
438 simd_float3 half = simd_normalize(from + to);
439439
440440 if (simd_length_squared(half) == 0) {
441441 // half is nearly zero, so from and to point in nearly opposite directions
......@@ -449,9 +449,8 @@ static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3 from, simd_float3 to
449449 else
450450 return _simd_quaternion(simd_normalize(simd_cross(from, (simd_float3){0,0,1})), 0.f);
451451 }
452
452
453453 // Compute the two-step rotation. */
454 half = simd_normalize(half);
455454 return simd_mul(_simd_quaternion_reduced(from, half),
456455 _simd_quaternion_reduced(half, to));
457456}
......@@ -1021,7 +1020,7 @@ static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3 from, simd_double3
10211020 // Because from and to are more than 90 degrees apart, we compute the
10221021 // rotation in two stages (from -> half), (half -> to) to preserve numerical
10231022 // accuracy.
1024 simd_double3 half = from + to;
1023 simd_double3 half = simd_normalize(from + to);
10251024
10261025 if (simd_length_squared(half) == 0) {
10271026 // half is nearly zero, so from and to point in nearly opposite directions
......@@ -1035,9 +1034,8 @@ static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3 from, simd_double3
10351034 else
10361035 return _simd_quaternion(simd_normalize(simd_cross(from, (simd_double3){0,0,1})), 0.f);
10371036 }
1038
1037
10391038 // Compute the two-step rotation. */
1040 half = simd_normalize(half);
10411039 return simd_mul(_simd_quaternion_reduced(from, half),
10421040 _simd_quaternion_reduced(half, to));
10431041}
lib/libc/include/x86_64-macos-gnu/spawn.h-22
......@@ -135,18 +135,12 @@ __BEGIN_DECLS
135135int posix_spawnattr_getbinpref_np(const posix_spawnattr_t * __restrict,
136136 size_t, cpu_type_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
137137
138int posix_spawnattr_getarchpref_np(const posix_spawnattr_t * __restrict,
139 size_t, cpu_type_t *__restrict, cpu_subtype_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(11.0), ios(14.0)) __API_UNAVAILABLE(watchos, tvos);
140
141138int posix_spawnattr_setauditsessionport_np(posix_spawnattr_t * __restrict,
142139 mach_port_t) __API_AVAILABLE(macos(10.6), ios(3.2));
143140
144141int posix_spawnattr_setbinpref_np(posix_spawnattr_t * __restrict,
145142 size_t, cpu_type_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
146143
147int posix_spawnattr_setarchpref_np(posix_spawnattr_t * __restrict,
148 size_t, cpu_type_t *__restrict, cpu_subtype_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(11.0), ios(14.0)) __API_UNAVAILABLE(watchos, tvos);
149
150144int posix_spawnattr_setexceptionports_np(posix_spawnattr_t * __restrict,
151145 exception_mask_t, mach_port_t,
152146 exception_behavior_t, thread_state_flavor_t) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
......@@ -156,22 +150,6 @@ int posix_spawnattr_setspecialport_np(posix_spawnattr_t * __restrict,
156150
157151int posix_spawnattr_setsuidcredport_np(posix_spawnattr_t * __restrict, mach_port_t) __API_UNAVAILABLE(ios, macos);
158152
159int posix_spawnattr_setnosmt_np(const posix_spawnattr_t * __restrict attr) __API_AVAILABLE(macos(11.0));
160
161/*
162 * Set CPU Security Mitigation on the spawned process
163 * This attribute affects all threads and is inherited on fork and exec
164 */
165int posix_spawnattr_set_csm_np(const posix_spawnattr_t * __restrict attr, uint32_t flags) __API_AVAILABLE(macos(11.0));
166/*
167 * flags for CPU Security Mitigation attribute
168 * POSIX_SPAWN_NP_CSM_ALL should be used in most cases,
169 * the individual flags are provided only for performance evaluation etc
170 */
171#define POSIX_SPAWN_NP_CSM_ALL 0x0001
172#define POSIX_SPAWN_NP_CSM_NOSMT 0x0002
173#define POSIX_SPAWN_NP_CSM_TECS 0x0004
174
175153int posix_spawn_file_actions_addinherit_np(posix_spawn_file_actions_t *,
176154 int) __API_AVAILABLE(macos(10.7), ios(4.3)) __API_UNAVAILABLE(watchos, tvos);
177155
lib/libc/include/x86_64-macos-gnu/stdio.h+1-1
......@@ -217,7 +217,7 @@ __END_DECLS
217217/* Additional functionality provided by:
218218 * POSIX.2-1992 C Language Binding Option
219219 */
220#if TARGET_OS_IPHONE
220#if TARGET_OS_EMBEDDED
221221#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(ios_msg)
222222#else
223223#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(osx_msg)
lib/libc/include/x86_64-macos-gnu/stdlib.h+1-4
......@@ -178,7 +178,7 @@ unsigned long long
178178 strtoull(const char *__str, char **__endptr, int __base);
179179#endif /* !__DARWIN_NO_LONG_LONG */
180180
181#if TARGET_OS_IPHONE
181#if TARGET_OS_EMBEDDED
182182#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(ios_msg)
183183#else
184184#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(osx_msg)
......@@ -347,9 +347,6 @@ int sradixsort(const unsigned char **__base, int __nel, const unsigned char *__
347347void sranddev(void);
348348void srandomdev(void);
349349void *reallocf(void *__ptr, size_t __size) __alloc_size(2);
350long long
351 strtonum(const char *__numstr, long long __minval, long long __maxval, const char **__errstrp)
352 __API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0));
353350#if !__DARWIN_NO_LONG_LONG
354351long long
355352 strtoq(const char *__str, char **__endptr, int __base);
lib/libc/include/x86_64-macos-gnu/string.h-4
......@@ -170,10 +170,6 @@ void swab(const void * __restrict, void * __restrict, ssize_t);
170170__OSX_AVAILABLE(10.12.1) __IOS_AVAILABLE(10.1)
171171__TVOS_AVAILABLE(10.0.1) __WATCHOS_AVAILABLE(3.1)
172172int timingsafe_bcmp(const void *__b1, const void *__b2, size_t __len);
173
174__OSX_AVAILABLE(11.0) __IOS_AVAILABLE(14.0)
175__TVOS_AVAILABLE(14.0) __WATCHOS_AVAILABLE(7.0)
176int strsignal_r(int __sig, char *__strsignalbuf, size_t __buflen);
177173__END_DECLS
178174
179175/* Some functions historically defined in string.h were placed in strings.h
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_attr_t.h+6-6
......@@ -2,7 +2,7 @@
22 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
33 *
44 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
5 *
66 * This file contains Original Code and/or Modifications of Original Code
77 * as defined in and that are subject to the Apple Public Source License
88 * Version 2.0 (the 'License'). You may not use this file except in
......@@ -11,10 +11,10 @@
1111 * unlawful or unlicensed copies of an Apple operating system, or to
1212 * circumvent, violate, or enable the circumvention or violation of, any
1313 * terms of an Apple operating system software license agreement.
14 *
14 *
1515 * Please obtain a copy of the License at
1616 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
17 *
1818 * The Original Code and all software distributed under the License are
1919 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
......@@ -22,11 +22,11 @@
2222 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323 * Please see the License for the specific language governing rights and
2424 * limitations under the License.
25 *
25 *
2626 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727 */
28#ifndef _PTHREAD_ATTR_T
29#define _PTHREAD_ATTR_T
28#ifndef _PTHREAD_ATTR_T
29#define _PTHREAD_ATTR_T
3030#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_attr_t */
3131typedef __darwin_pthread_attr_t pthread_attr_t;
3232#endif /* _PTHREAD_ATTR_T */
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_cond_t.h+4-4
......@@ -2,7 +2,7 @@
22 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
33 *
44 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
5 *
66 * This file contains Original Code and/or Modifications of Original Code
77 * as defined in and that are subject to the Apple Public Source License
88 * Version 2.0 (the 'License'). You may not use this file except in
......@@ -11,10 +11,10 @@
1111 * unlawful or unlicensed copies of an Apple operating system, or to
1212 * circumvent, violate, or enable the circumvention or violation of, any
1313 * terms of an Apple operating system software license agreement.
14 *
14 *
1515 * Please obtain a copy of the License at
1616 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
17 *
1818 * The Original Code and all software distributed under the License are
1919 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
......@@ -22,7 +22,7 @@
2222 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323 * Please see the License for the specific language governing rights and
2424 * limitations under the License.
25 *
25 *
2626 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727 */
2828#ifndef _PTHREAD_COND_T
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_condattr_t.h+4-4
......@@ -2,7 +2,7 @@
22 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
33 *
44 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
5 *
66 * This file contains Original Code and/or Modifications of Original Code
77 * as defined in and that are subject to the Apple Public Source License
88 * Version 2.0 (the 'License'). You may not use this file except in
......@@ -11,10 +11,10 @@
1111 * unlawful or unlicensed copies of an Apple operating system, or to
1212 * circumvent, violate, or enable the circumvention or violation of, any
1313 * terms of an Apple operating system software license agreement.
14 *
14 *
1515 * Please obtain a copy of the License at
1616 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
17 *
1818 * The Original Code and all software distributed under the License are
1919 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
......@@ -22,7 +22,7 @@
2222 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323 * Please see the License for the specific language governing rights and
2424 * limitations under the License.
25 *
25 *
2626 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727 */
2828#ifndef _PTHREAD_CONDATTR_T
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_rwlock_t.h+4-4
......@@ -2,7 +2,7 @@
22 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
33 *
44 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
5 *
66 * This file contains Original Code and/or Modifications of Original Code
77 * as defined in and that are subject to the Apple Public Source License
88 * Version 2.0 (the 'License'). You may not use this file except in
......@@ -11,10 +11,10 @@
1111 * unlawful or unlicensed copies of an Apple operating system, or to
1212 * circumvent, violate, or enable the circumvention or violation of, any
1313 * terms of an Apple operating system software license agreement.
14 *
14 *
1515 * Please obtain a copy of the License at
1616 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
17 *
1818 * The Original Code and all software distributed under the License are
1919 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
......@@ -22,7 +22,7 @@
2222 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323 * Please see the License for the specific language governing rights and
2424 * limitations under the License.
25 *
25 *
2626 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727 */
2828#ifndef _PTHREAD_RWLOCK_T
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_rwlockattr_t.h+4-4
......@@ -2,7 +2,7 @@
22 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
33 *
44 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
5 *
66 * This file contains Original Code and/or Modifications of Original Code
77 * as defined in and that are subject to the Apple Public Source License
88 * Version 2.0 (the 'License'). You may not use this file except in
......@@ -11,10 +11,10 @@
1111 * unlawful or unlicensed copies of an Apple operating system, or to
1212 * circumvent, violate, or enable the circumvention or violation of, any
1313 * terms of an Apple operating system software license agreement.
14 *
14 *
1515 * Please obtain a copy of the License at
1616 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
17 *
1818 * The Original Code and all software distributed under the License are
1919 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
......@@ -22,7 +22,7 @@
2222 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323 * Please see the License for the specific language governing rights and
2424 * limitations under the License.
25 *
25 *
2626 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727 */
2828#ifndef _PTHREAD_RWLOCKATTR_T
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_t.h+4-4
......@@ -2,7 +2,7 @@
22 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
33 *
44 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
5 *
66 * This file contains Original Code and/or Modifications of Original Code
77 * as defined in and that are subject to the Apple Public Source License
88 * Version 2.0 (the 'License'). You may not use this file except in
......@@ -11,10 +11,10 @@
1111 * unlawful or unlicensed copies of an Apple operating system, or to
1212 * circumvent, violate, or enable the circumvention or violation of, any
1313 * terms of an Apple operating system software license agreement.
14 *
14 *
1515 * Please obtain a copy of the License at
1616 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
17 *
1818 * The Original Code and all software distributed under the License are
1919 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
......@@ -22,7 +22,7 @@
2222 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323 * Please see the License for the specific language governing rights and
2424 * limitations under the License.
25 *
25 *
2626 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727 */
2828#ifndef _PTHREAD_T
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_types.h+4-4
......@@ -2,7 +2,7 @@
22 * Copyright (c) 2003-2013 Apple Inc. All rights reserved.
33 *
44 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
5 *
66 * This file contains Original Code and/or Modifications of Original Code
77 * as defined in and that are subject to the Apple Public Source License
88 * Version 2.0 (the 'License'). You may not use this file except in
......@@ -11,10 +11,10 @@
1111 * unlawful or unlicensed copies of an Apple operating system, or to
1212 * circumvent, violate, or enable the circumvention or violation of, any
1313 * terms of an Apple operating system software license agreement.
14 *
14 *
1515 * Please obtain a copy of the License at
1616 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
17 *
1818 * The Original Code and all software distributed under the License are
1919 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
......@@ -22,7 +22,7 @@
2222 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323 * Please see the License for the specific language governing rights and
2424 * limitations under the License.
25 *
25 *
2626 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727 */
2828
lib/libc/include/x86_64-macos-gnu/sys/_select.h-5
......@@ -36,13 +36,8 @@
3636#ifndef _SYS__SELECT_H_
3737#define _SYS__SELECT_H_
3838
39#include <sys/cdefs.h> /* __DARWIN_EXTSN_C, __DARWIN_1050, __DARWIN_ALIAS_C */
40#include <sys/_types/_fd_def.h> /* fd_set */
41#include <sys/_types/_timeval.h> /* struct timeval */
42
4339int select(int, fd_set * __restrict, fd_set * __restrict,
4440 fd_set * __restrict, struct timeval * __restrict)
45
4641#if defined(_DARWIN_C_SOURCE) || defined(_DARWIN_UNLIMITED_SELECT)
4742__DARWIN_EXTSN_C(select)
4843#else /* !_DARWIN_C_SOURCE && !_DARWIN_UNLIMITED_SELECT */
lib/libc/include/x86_64-macos-gnu/sys/_symbol_aliasing.h-36
......@@ -305,30 +305,6 @@
305305#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_6(x)
306306#endif
307307
308#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130700
309#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_7(x) x
310#else
311#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_7(x)
312#endif
313
314#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 140000
315#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_0(x) x
316#else
317#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_0(x)
318#endif
319
320#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 140100
321#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_1(x) x
322#else
323#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_1(x)
324#endif
325
326#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 140200
327#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_2(x) x
328#else
329#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_2(x)
330#endif
331
332308#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1000
333309#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_0(x) x
334310#else
......@@ -521,15 +497,3 @@
521497#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_15_1(x)
522498#endif
523499
524#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101600
525#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_16(x) x
526#else
527#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_16(x)
528#endif
529
530#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 110000
531#define __DARWIN_ALIAS_STARTING_MAC___MAC_11_0(x) x
532#else
533#define __DARWIN_ALIAS_STARTING_MAC___MAC_11_0(x)
534#endif
535
lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_def.h+1-8
......@@ -51,16 +51,12 @@ typedef struct fd_set {
5151 __int32_t fds_bits[__DARWIN_howmany(__DARWIN_FD_SETSIZE, __DARWIN_NFDBITS)];
5252} fd_set;
5353
54int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
54int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
5555__END_DECLS
5656
5757__header_always_inline int
5858__darwin_check_fd_set(int _a, const void *_b)
5959{
60#ifdef __clang__
61#pragma clang diagnostic push
62#pragma clang diagnostic ignored "-Wunguarded-availability-new"
63#endif
6460 if ((uintptr_t)&__darwin_check_fd_set_overflow != (uintptr_t) 0) {
6561#if defined(_DARWIN_UNLIMITED_SELECT) || defined(_DARWIN_C_SOURCE)
6662 return __darwin_check_fd_set_overflow(_a, _b, 1);
......@@ -70,9 +66,6 @@ __darwin_check_fd_set(int _a, const void *_b)
7066 } else {
7167 return 1;
7268 }
73#ifdef __clang__
74#pragma clang diagnostic pop
75#endif
7669}
7770
7871/* This inline avoids argument side-effect issues with FD_ISSET() */
lib/libc/include/x86_64-macos-gnu/sys/_types/_int8_t.h+1-1
......@@ -27,5 +27,5 @@
2727 */
2828#ifndef _INT8_T
2929#define _INT8_T
30typedef signed char int8_t;
30typedef __signed char int8_t;
3131#endif /* _INT8_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_ucontext.h-1
......@@ -38,7 +38,6 @@
3838#include <machine/types.h> /* __darwin_size_t */
3939#include <machine/_mcontext.h> /* _STRUCT_MCONTEXT */
4040#include <sys/_types.h> /* __darwin_sigset_t */
41#include <sys/_types/_sigaltstack.h> /* _STRUCT_SIGALTSTACK */
4241
4342_STRUCT_UCONTEXT
4443{
lib/libc/include/x86_64-macos-gnu/sys/acl.h-1
......@@ -25,7 +25,6 @@
2525
2626#include <Availability.h>
2727#include <sys/kauth.h>
28#include <sys/_types/_ssize_t.h>
2928
3029#define __DARWIN_ACL_READ_DATA (1<<1)
3130#define __DARWIN_ACL_LIST_DIRECTORY __DARWIN_ACL_READ_DATA
lib/libc/include/x86_64-macos-gnu/sys/attr.h+1-8
......@@ -51,7 +51,6 @@
5151
5252
5353#define FSOPT_ATTR_CMN_EXTENDED 0x00000020
54#define FSOPT_RETURN_REALDEV 0x00000200
5554
5655/* we currently aren't anywhere near this amount for a valid
5756 * fssearchblock.sizeofsearchparams1 or fssearchblock.sizeofsearchparams2
......@@ -240,10 +239,6 @@ typedef struct vol_capabilities_attr {
240239 * that implies multiple volumes must be mounted in order to boot and root the
241240 * operating system. Typically, this means a read-only system volume and a
242241 * writable data volume.
243 *
244 * VOL_CAP_FMT_SEALED: When set, this volume is cryptographically sealed.
245 * Any modifications to volume data or metadata will be detected and may
246 * render the volume unusable.
247242 */
248243#define VOL_CAP_FMT_PERSISTENTOBJECTIDS 0x00000001
249244#define VOL_CAP_FMT_SYMBOLICLINKS 0x00000002
......@@ -270,7 +265,6 @@ typedef struct vol_capabilities_attr {
270265#define VOL_CAP_FMT_NO_PERMISSIONS 0x00400000
271266#define VOL_CAP_FMT_SHARED_SPACE 0x00800000
272267#define VOL_CAP_FMT_VOL_GROUPS 0x01000000
273#define VOL_CAP_FMT_SEALED 0x02000000
274268
275269/*
276270 * VOL_CAP_INT_SEARCHFS: When set, the volume implements the
......@@ -521,9 +515,8 @@ typedef struct vol_attributes_attr {
521515#define ATTR_CMNEXT_REALFSID 0x00000080
522516#define ATTR_CMNEXT_CLONEID 0x00000100
523517#define ATTR_CMNEXT_EXT_FLAGS 0x00000200
524#define ATTR_CMNEXT_RECURSIVE_GENCOUNT 0x00000400
525518
526#define ATTR_CMNEXT_VALIDMASK 0x000007fc
519#define ATTR_CMNEXT_VALIDMASK 0x000003fc
527520#define ATTR_CMNEXT_SETMASK 0x00000000
528521
529522/* Deprecated fork attributes */
lib/libc/include/x86_64-macos-gnu/sys/cdefs.h+11-32
......@@ -174,15 +174,6 @@
174174#define __cold
175175#endif
176176
177/* __exported denotes symbols that should be exported even when symbols
178 * are hidden by default.
179 * __exported_push/_exported_pop are pragmas used to delimit a range of
180 * symbols that should be exported even when symbols are hidden by default.
181 */
182#define __exported __attribute__((__visibility__("default")))
183#define __exported_push _Pragma("GCC visibility push(default)")
184#define __exported_pop _Pragma("GCC visibility pop")
185
186177/* __deprecated causes the compiler to produce a warning when encountering
187178 * code using the deprecated functionality.
188179 * __deprecated_msg() does the same, and compilers that support it will print
......@@ -211,17 +202,9 @@
211202#define __kpi_deprecated(_msg)
212203
213204/* __unavailable causes the compiler to error out when encountering
214 * code using the tagged function
205 * code using the tagged function of variable.
215206 */
216#if __has_attribute(unavailable)
217#define __unavailable __attribute__((__unavailable__))
218#else
219#define __unavailable
220#endif
221
222#define __kpi_unavailable
223
224#define __kpi_deprecated_arm64_macos_unavailable
207#define __unavailable __attribute__((__unavailable__))
225208
226209/* Delete pseudo-keywords wherever they are not available or needed. */
227210#ifndef __dead
......@@ -488,19 +471,9 @@
488471
489472/* These settings are particular to each product. */
490473/* Platform: MacOSX */
491#if defined(__i386__)
492474#define __DARWIN_ONLY_64_BIT_INO_T 0
493#define __DARWIN_ONLY_UNIX_CONFORMANCE 0
475/* #undef __DARWIN_ONLY_UNIX_CONFORMANCE (automatically set for 64-bit) */
494476#define __DARWIN_ONLY_VERS_1050 0
495#elif defined(__x86_64__)
496#define __DARWIN_ONLY_64_BIT_INO_T 0
497#define __DARWIN_ONLY_UNIX_CONFORMANCE 1
498#define __DARWIN_ONLY_VERS_1050 0
499#else
500#define __DARWIN_ONLY_64_BIT_INO_T 1
501#define __DARWIN_ONLY_UNIX_CONFORMANCE 1
502#define __DARWIN_ONLY_VERS_1050 1
503#endif
504477
505478/*
506479 * The __DARWIN_ALIAS macros are used to do symbol renaming; they allow
......@@ -520,6 +493,14 @@
520493 * pre-10.5, and it is the default compilation environment, revert the
521494 * compilation environment to pre-__DARWIN_UNIX03.
522495 */
496#if !defined(__DARWIN_ONLY_UNIX_CONFORMANCE)
497# if defined(__LP64__)
498# define __DARWIN_ONLY_UNIX_CONFORMANCE 1
499# else /* !__LP64__ */
500# define __DARWIN_ONLY_UNIX_CONFORMANCE 0
501# endif /* __LP64__ */
502#endif /* !__DARWIN_ONLY_UNIX_CONFORMANCE */
503
523504#if !defined(__DARWIN_UNIX03)
524505# if __DARWIN_ONLY_UNIX_CONFORMANCE
525506# if defined(_NONSTD_SOURCE)
......@@ -822,8 +803,6 @@
822803 */
823804#if !defined(__sys_cdefs_arch_unknown__) && defined(__i386__)
824805#elif !defined(__sys_cdefs_arch_unknown__) && defined(__x86_64__)
825#elif !defined(__sys_cdefs_arch_unknown__) && defined(__arm__)
826#elif !defined(__sys_cdefs_arch_unknown__) && defined(__arm64__)
827806#else
828807#error Unsupported architecture
829808#endif
lib/libc/include/x86_64-macos-gnu/sys/event.h+1-1
......@@ -262,7 +262,7 @@ enum {
262262#define NOTE_EXEC 0x20000000 /* process exec'd */
263263#define NOTE_REAP ((unsigned int)eNoteReapDeprecated /* 0x10000000 */ ) /* process reaped */
264264#define NOTE_SIGNAL 0x08000000 /* shared with EVFILT_SIGNAL */
265#define NOTE_EXITSTATUS 0x04000000 /* exit status to be returned, valid for child process or when allowed to signal target pid */
265#define NOTE_EXITSTATUS 0x04000000 /* exit status to be returned, valid for child process only */
266266#define NOTE_EXIT_DETAIL 0x02000000 /* provide details on reasons for exit */
267267
268268#define NOTE_PDATAMASK 0x000fffff /* mask for signal & exit status */
lib/libc/include/x86_64-macos-gnu/sys/fcntl.h+48-72
......@@ -107,51 +107,24 @@
107107 * which was documented to use FREAD/FWRITE, continues to work.
108108 */
109109#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
110#define FREAD 0x00000001
111#define FWRITE 0x00000002
110#define FREAD 0x0001
111#define FWRITE 0x0002
112112#endif
113#define O_NONBLOCK 0x00000004 /* no delay */
114#define O_APPEND 0x00000008 /* set append mode */
113#define O_NONBLOCK 0x0004 /* no delay */
114#define O_APPEND 0x0008 /* set append mode */
115115
116116#include <sys/_types/_o_sync.h>
117117
118118#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
119#define O_SHLOCK 0x00000010 /* open with shared file lock */
120#define O_EXLOCK 0x00000020 /* open with exclusive file lock */
121#define O_ASYNC 0x00000040 /* signal pgrp when data ready */
119#define O_SHLOCK 0x0010 /* open with shared file lock */
120#define O_EXLOCK 0x0020 /* open with exclusive file lock */
121#define O_ASYNC 0x0040 /* signal pgrp when data ready */
122122#define O_FSYNC O_SYNC /* source compatibility: do not use */
123#define O_NOFOLLOW 0x00000100 /* don't follow symlinks */
123#define O_NOFOLLOW 0x0100 /* don't follow symlinks */
124124#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
125#define O_CREAT 0x00000200 /* create if nonexistant */
126#define O_TRUNC 0x00000400 /* truncate to zero length */
127#define O_EXCL 0x00000800 /* error if already exists */
128
129#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
130#define O_EVTONLY 0x00008000 /* descriptor requested for event notifications only */
131#endif
132
133
134#define O_NOCTTY 0x00020000 /* don't assign controlling terminal */
135
136
137#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
138#define O_DIRECTORY 0x00100000
139#define O_SYMLINK 0x00200000 /* allow open of a symlink */
140#endif
141
142// O_DSYNC 0x00400000 /* synch I/O data integrity */
143#include <sys/_types/_o_dsync.h>
144
145
146#if __DARWIN_C_LEVEL >= 200809L
147#define O_CLOEXEC 0x01000000 /* implicitly set FD_CLOEXEC */
148#endif
149
150
151#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
152#define O_NOFOLLOW_ANY 0x20000000 /* no symlinks allowed in path */
153#endif
154
125#define O_CREAT 0x0200 /* create if nonexistant */
126#define O_TRUNC 0x0400 /* truncate to zero length */
127#define O_EXCL 0x0800 /* error if already exists */
155128
156129#if __DARWIN_C_LEVEL >= 200809L
157130/*
......@@ -172,6 +145,30 @@
172145#endif
173146#endif
174147
148#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
149#define O_EVTONLY 0x8000 /* descriptor requested for event notifications only */
150#endif
151
152
153#define O_NOCTTY 0x20000 /* don't assign controlling terminal */
154
155
156#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
157#define O_DIRECTORY 0x100000
158#define O_SYMLINK 0x200000 /* allow open of a symlink */
159#endif
160
161#include <sys/_types/_o_dsync.h>
162
163
164#if __DARWIN_C_LEVEL >= 200809L
165#define O_CLOEXEC 0x1000000 /* implicitly set FD_CLOEXEC */
166#endif
167
168
169
170
171
175172/* Data Protection Flags */
176173#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
177174#define O_DP_GETRAWENCRYPTED 0x0001
......@@ -227,7 +224,7 @@
227224#define F_FLUSH_DATA 40
228225#define F_CHKCLEAN 41 /* Used for regression test */
229226#define F_PREALLOCATE 42 /* Preallocate storage */
230#define F_SETSIZE 43 /* Truncate a file. Equivalent to calling truncate(2) */
227#define F_SETSIZE 43 /* Truncate a file without zeroing space */
231228#define F_RDADVISE 44 /* Issue an advisory read async with no copy to user */
232229#define F_RDAHEAD 45 /* turn read ahead off/on for this fd */
233230/*
......@@ -296,10 +293,6 @@
296293
297294#define F_GETPATH_NOFIRMLINK 102 /* return the full path without firmlinks of the fd */
298295
299#define F_ADDFILESIGS_INFO 103 /* Add signature from same file, return information */
300#define F_ADDFILESUPPL 104 /* Add supplemental signature from same file with fd reference to original */
301#define F_GETSIGSINFO 105 /* Look up code signature information attached to a file or slice */
302
303296// FS-specific fcntl()'s numbers begin at 0x00010000 and go up
304297#define FCNTL_FS_SPECIFIC_BASE 0x00010000
305298
......@@ -381,34 +374,30 @@ struct radvisory {
381374};
382375
383376
377/** Information the user passes in to get the codeblobs out of the kernel */
378typedef struct fcodeblobs {
379 void *f_cd_hash;
380 size_t f_hash_size;
381 void *f_cd_buffer;
382 size_t f_cd_size;
383 unsigned int *f_out_size;
384 int f_arch;
385 int __padding;
386} fcodeblobs_t;
387
388
384389/*
385390 * detached code signatures data type -
386391 * information passed by user to system used by F_ADDSIGS and F_ADDFILESIGS.
387392 * F_ADDFILESIGS is a shortcut for files that contain their own signature and
388393 * doesn't require mapping of the file in order to load the signature.
389394 */
390#define USER_FSIGNATURES_CDHASH_LEN 20
391395typedef struct fsignatures {
392396 off_t fs_file_start;
393397 void *fs_blob_start;
394398 size_t fs_blob_size;
395
396 /* The following fields are only applicable to F_ADDFILESIGS_INFO (64bit only). */
397 /* Prior to F_ADDFILESIGS_INFO, this struct ended after fs_blob_size. */
398 size_t fs_fsignatures_size;// input: size of this struct (for compatibility)
399 char fs_cdhash[USER_FSIGNATURES_CDHASH_LEN]; // output: cdhash
400 int fs_hash_type;// output: hash algorithm type for cdhash
401399} fsignatures_t;
402400
403typedef struct fsupplement {
404 off_t fs_file_start; /* offset of Mach-O image in FAT file */
405 off_t fs_blob_start; /* offset of signature in Mach-O image */
406 size_t fs_blob_size; /* signature blob size */
407 int fs_orig_fd; /* address of original image */
408} fsupplement_t;
409
410
411
412401/*
413402 * DYLD needs to check if the object is allowed to be combined
414403 * into the main binary. This is done between the code signature
......@@ -426,19 +415,6 @@ typedef struct fchecklv {
426415} fchecklv_t;
427416
428417
429/* At this time F_GETSIGSINFO can only indicate platformness.
430 * As additional requestable information is defined, new keys will be added and the
431 * fgetsigsinfo_t structure will be lengthened to add space for the additional information
432 */
433#define GETSIGSINFO_PLATFORM_BINARY 1
434
435/* fgetsigsinfo_t used by F_GETSIGSINFO command */
436typedef struct fgetsigsinfo {
437 off_t fg_file_start; /* IN: Offset in the file to look for a signature, -1 for any signature */
438 int fg_info_request; /* IN: Key indicating the info requested */
439 int fg_sig_is_platform; /* OUT: 1 if the signature is a plat form binary, 0 if not */
440} fgetsigsinfo_t;
441
442418
443419/* lock operations for flock(2) */
444420#define LOCK_SH 0x01 /* shared file lock */
lib/libc/include/x86_64-macos-gnu/sys/ioccom.h+1-1
......@@ -83,7 +83,7 @@
8383#define IOC_OUT (__uint32_t)0x40000000
8484/* copy parameters in */
8585#define IOC_IN (__uint32_t)0x80000000
86/* copy parameters in and out */
86/* copy paramters in and out */
8787#define IOC_INOUT (IOC_IN|IOC_OUT)
8888/* mask for IN/OUT/VOID */
8989#define IOC_DIRMASK (__uint32_t)0xe0000000
lib/libc/include/x86_64-macos-gnu/sys/kauth.h-3
......@@ -38,10 +38,7 @@
3838#include <sys/appleapiopts.h>
3939#include <sys/cdefs.h>
4040#include <mach/boolean.h>
41#include <machine/types.h> /* u_int8_t, etc. */
4241#include <sys/_types.h> /* __offsetof() */
43#include <sys/_types/_uid_t.h> /* uid_t */
44#include <sys/_types/_gid_t.h> /* gid_t */
4542#include <sys/syslimits.h> /* NGROUPS_MAX */
4643
4744#ifdef __APPLE_API_EVOLVING
lib/libc/include/x86_64-macos-gnu/sys/mman.h+4-17
......@@ -1,5 +1,5 @@
11/*
2 * Copyright (c) 2000-2020 Apple Computer, Inc. All rights reserved.
2 * Copyright (c) 2000-2019 Apple Computer, Inc. All rights reserved.
33 *
44 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55 *
......@@ -89,10 +89,6 @@
8989#include <sys/_types/_off_t.h>
9090#include <sys/_types/_size_t.h>
9191
92#if __DARWIN_C_LEVEL >= 200809L
93#include <Availability.h>
94#endif /* __DARWIN_C_LEVEL */
95
9692/*
9793 * Protections are chosen from these bits, or-ed together
9894 */
......@@ -149,17 +145,9 @@
149145#define MAP_RESILIENT_CODESIGN 0x2000 /* no code-signing failures */
150146#define MAP_RESILIENT_MEDIA 0x4000 /* no backing-store failures */
151147
152#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500
153#define MAP_32BIT 0x8000 /* Return virtual addresses <4G only */
154#endif /* defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500 */
155
156
157/*
158 * Flags used to support translated processes.
159 */
160#define MAP_TRANSLATED_ALLOW_EXECUTE 0x20000 /* allow execute in translated processes */
161
162#define MAP_UNIX03 0x40000 /* UNIX03 compliance */
148#if !defined(CONFIG_EMBEDDED)
149#define MAP_32BIT 0x8000 /* Return virtual addresses <4G only: Requires entitlement */
150#endif /* !defined(CONFIG_EMBEDDED) */
163151
164152#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
165153
......@@ -225,7 +213,6 @@
225213
226214
227215
228
229216__BEGIN_DECLS
230217/* [ML] */
231218int mlockall(int);
lib/libc/include/x86_64-macos-gnu/sys/mount.h+1-12
......@@ -324,7 +324,7 @@ struct vfsidctl {
324324 * New style VFS sysctls, do not reuse/conflict with the namespace for
325325 * private sysctls.
326326 */
327#define VFS_CTL_OSTATFS 0x00010001 /* old legacy statfs */
327#define VFS_CTL_STATFS 0x00010001 /* statfs */
328328#define VFS_CTL_UMOUNT 0x00010002 /* unmount */
329329#define VFS_CTL_QUERY 0x00010003 /* anything wrong? (vfsquery) */
330330#define VFS_CTL_NEWADDR 0x00010004 /* reconnect to new address */
......@@ -334,17 +334,6 @@ struct vfsidctl {
334334#define VFS_CTL_DISC 0x00010008 /* server disconnected */
335335#define VFS_CTL_SERVERINFO 0x00010009 /* information about fs server */
336336#define VFS_CTL_NSTATUS 0x0001000A /* netfs mount status */
337#define VFS_CTL_STATFS64 0x0001000B /* statfs64 */
338
339/*
340 * Automatically select the correct VFS_CTL_*STATFS* flavor based
341 * on what "struct statfs" layout the client will use.
342 */
343#if __DARWIN_64_BIT_INO_T
344#define VFS_CTL_STATFS VFS_CTL_STATFS64
345#else
346#define VFS_CTL_STATFS VFS_CTL_OSTATFS
347#endif
348337
349338struct vfsquery {
350339 u_int32_t vq_flags;
lib/libc/include/x86_64-macos-gnu/sys/param.h+22-4
......@@ -197,10 +197,10 @@
197197#define MAXSYMLINKS 32
198198
199199/* Bit map related macros. */
200#define setbit(a, i) (((unsigned char *)(a))[(i)/NBBY] |= 1u<<((i)%NBBY))
201#define clrbit(a, i) (((unsigned char *)(a))[(i)/NBBY] &= ~(1u<<((i)%NBBY)))
202#define isset(a, i) (((unsigned char *)(a))[(i)/NBBY] & (1u<<((i)%NBBY)))
203#define isclr(a, i) ((((unsigned char *)(a))[(i)/NBBY] & (1u<<((i)%NBBY))) == 0)
200#define setbit(a, i) (((char *)(a))[(i)/NBBY] |= 1<<((i)%NBBY))
201#define clrbit(a, i) (((char *)(a))[(i)/NBBY] &= ~(1<<((i)%NBBY)))
202#define isset(a, i) (((char *)(a))[(i)/NBBY] & (1<<((i)%NBBY)))
203#define isclr(a, i) ((((char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
204204
205205/* Macros for counting and rounding. */
206206#ifndef howmany
......@@ -218,6 +218,24 @@
218218#define MAX(a, b) (((a)>(b))?(a):(b))
219219#endif /* MAX */
220220
221/*
222 * Constants for setting the parameters of the kernel memory allocator.
223 *
224 * 2 ** MINBUCKET is the smallest unit of memory that will be
225 * allocated. It must be at least large enough to hold a pointer.
226 *
227 * Units of memory less or equal to MAXALLOCSAVE will permanently
228 * allocate physical memory; requests for these size pieces of
229 * memory are quite fast. Allocations greater than MAXALLOCSAVE must
230 * always allocate and free physical memory; requests for these
231 * size allocations should be done infrequently as they will be slow.
232 *
233 * Constraints: CLBYTES <= MAXALLOCSAVE <= 2 ** (MINBUCKET + 14), and
234 * MAXALLOCSIZE must be a power of two.
235 */
236#define MINBUCKET 4 /* 4 => min allocation of 16 bytes */
237#define MAXALLOCSAVE (2 * CLBYTES)
238
221239/*
222240 * Scale factor for scaled integers used to count %cpu time and load avgs.
223241 *
lib/libc/include/x86_64-macos-gnu/sys/proc.h-1
......@@ -84,7 +84,6 @@
8484struct session;
8585struct pgrp;
8686struct proc;
87struct proc_ident;
8887
8988/* Exported fields for kern sysctls */
9089struct extern_proc {
lib/libc/include/x86_64-macos-gnu/sys/resource.h+2-56
......@@ -188,13 +188,7 @@ struct rusage {
188188#define RUSAGE_INFO_V2 2
189189#define RUSAGE_INFO_V3 3
190190#define RUSAGE_INFO_V4 4
191#define RUSAGE_INFO_V5 5
192#define RUSAGE_INFO_CURRENT RUSAGE_INFO_V5
193
194/*
195 * Flags for RUSAGE_INFO_V5
196 */
197#define RU_PROC_RUNS_RESLIDE 0x00000001 /* proc has reslid shared cache */
191#define RUSAGE_INFO_CURRENT RUSAGE_INFO_V4
198192
199193typedef void *rusage_info_t;
200194
......@@ -324,47 +318,7 @@ struct rusage_info_v4 {
324318 uint64_t ri_runnable_time;
325319};
326320
327struct rusage_info_v5 {
328 uint8_t ri_uuid[16];
329 uint64_t ri_user_time;
330 uint64_t ri_system_time;
331 uint64_t ri_pkg_idle_wkups;
332 uint64_t ri_interrupt_wkups;
333 uint64_t ri_pageins;
334 uint64_t ri_wired_size;
335 uint64_t ri_resident_size;
336 uint64_t ri_phys_footprint;
337 uint64_t ri_proc_start_abstime;
338 uint64_t ri_proc_exit_abstime;
339 uint64_t ri_child_user_time;
340 uint64_t ri_child_system_time;
341 uint64_t ri_child_pkg_idle_wkups;
342 uint64_t ri_child_interrupt_wkups;
343 uint64_t ri_child_pageins;
344 uint64_t ri_child_elapsed_abstime;
345 uint64_t ri_diskio_bytesread;
346 uint64_t ri_diskio_byteswritten;
347 uint64_t ri_cpu_time_qos_default;
348 uint64_t ri_cpu_time_qos_maintenance;
349 uint64_t ri_cpu_time_qos_background;
350 uint64_t ri_cpu_time_qos_utility;
351 uint64_t ri_cpu_time_qos_legacy;
352 uint64_t ri_cpu_time_qos_user_initiated;
353 uint64_t ri_cpu_time_qos_user_interactive;
354 uint64_t ri_billed_system_time;
355 uint64_t ri_serviced_system_time;
356 uint64_t ri_logical_writes;
357 uint64_t ri_lifetime_max_phys_footprint;
358 uint64_t ri_instructions;
359 uint64_t ri_cycles;
360 uint64_t ri_billed_energy;
361 uint64_t ri_serviced_energy;
362 uint64_t ri_interval_max_phys_footprint;
363 uint64_t ri_runnable_time;
364 uint64_t ri_flags;
365};
366
367typedef struct rusage_info_v5 rusage_info_current;
321typedef struct rusage_info_v4 rusage_info_current;
368322
369323#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
370324
......@@ -455,8 +409,6 @@ struct proc_rlimit_control_wakeupmon {
455409#define IOPOL_TYPE_VFS_ATIME_UPDATES 2
456410#define IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES 3
457411#define IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME 4
458#define IOPOL_TYPE_VFS_TRIGGER_RESOLVE 5
459#define IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION 6
460412
461413/* scope */
462414#define IOPOL_SCOPE_PROCESS 0
......@@ -486,12 +438,6 @@ struct proc_rlimit_control_wakeupmon {
486438#define IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT 0
487439#define IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME 1
488440
489#define IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT 0
490#define IOPOL_VFS_TRIGGER_RESOLVE_OFF 1
491
492#define IOPOL_VFS_CONTENT_PROTECTION_DEFAULT 0
493#define IOPOL_VFS_CONTENT_PROTECTION_IGNORE 1
494
495441#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
496442
497443
lib/libc/include/x86_64-macos-gnu/sys/shm.h-4
......@@ -109,11 +109,7 @@ typedef unsigned short shmatt_t;
109109 * headers at this time, to avoid the resulting namespace
110110 * pollution, which is why we discourages its use.
111111 */
112#if __arm64__
113#define SHMLBA (16*1024) /* [XSI] Segment low boundary address multiple*/
114#else /* __arm64__ */
115112#define SHMLBA 4096 /* [XSI] Segment low boundary address multiple*/
116#endif /* __arm64__ */
117113
118114/* "official" access mode definitions; somewhat braindead since you have
119115 * to specify (SHM_* >> 3) for group and (SHM_* >> 6) for world permissions */
lib/libc/include/x86_64-macos-gnu/sys/socket.h+6-15
......@@ -160,8 +160,8 @@
160160#define SO_ERROR 0x1007 /* get error status and clear */
161161#define SO_TYPE 0x1008 /* get socket type */
162162#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
163#define SO_LABEL 0x1010 /* deprecated */
164#define SO_PEERLABEL 0x1011 /* deprecated */
163#define SO_LABEL 0x1010 /* socket's MAC label */
164#define SO_PEERLABEL 0x1011 /* socket's peer MAC label */
165165#ifdef __APPLE__
166166#define SO_NREAD 0x1020 /* APPLE: get 1st-packet byte count */
167167#define SO_NKE 0x1021 /* APPLE: Install socket-level NKE */
......@@ -182,7 +182,7 @@
182182#define SO_NET_SERVICE_TYPE 0x1116 /* Network service type */
183183
184184
185#define SO_NETSVC_MARKING_LEVEL 0x1119 /* Get QoS marking in effect for socket */
185#define SO_NETSVC_MARKING_LEVEL 0x1119 /* Get QoS marking in effect for socket */
186186
187187/*
188188 * Network Service Type for option SO_NET_SERVICE_TYPE
......@@ -398,8 +398,7 @@ struct so_np_extensions {
398398#define AF_RESERVED_36 36 /* Reserved for internal usage */
399399#define AF_IEEE80211 37 /* IEEE 802.11 protocol */
400400#define AF_UTUN 38
401#define AF_VSOCK 40 /* VM Sockets */
402#define AF_MAX 41
401#define AF_MAX 40
403402#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
404403
405404/*
......@@ -487,7 +486,6 @@ struct sockaddr_storage {
487486#define PF_PPP AF_PPP
488487#define PF_RESERVED_36 AF_RESERVED_36
489488#define PF_UTUN AF_UTUN
490#define PF_VSOCK AF_VSOCK
491489#define PF_MAX AF_MAX
492490
493491/*
......@@ -580,13 +578,6 @@ struct msghdr {
580578#define MSG_NEEDSA 0x10000 /* Fail receive if socket address cannot be allocated */
581579#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
582580
583#if __DARWIN_C_LEVEL >= 200809L
584#define MSG_NOSIGNAL 0x80000 /* do not generate SIGPIPE on EOF */
585#endif /* __DARWIN_C_LEVEL */
586
587#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
588#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
589
590581/*
591582 * Header for ancillary data objects in msg_control buffer.
592583 * Used for additional information with/about a datagram
......@@ -680,7 +671,7 @@ struct cmsgcred {
680671#define SHUT_WR 1 /* shut down the writing side */
681672#define SHUT_RDWR 2 /* shut down both sides */
682673
683#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
674#if !defined(_POSIX_C_SOURCE)
684675/*
685676 * sendfile(2) header/trailer struct
686677 */
......@@ -692,7 +683,7 @@ struct sf_hdtr {
692683};
693684
694685
695#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
686#endif /* !_POSIX_C_SOURCE */
696687
697688
698689__BEGIN_DECLS
lib/libc/include/x86_64-macos-gnu/sys/spawn.h+1-3
......@@ -1,5 +1,5 @@
11/*
2 * Copyright (c) 2006-2020 Apple Computer, Inc. All rights reserved.
2 * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
33 *
44 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55 *
......@@ -61,8 +61,6 @@
6161#define POSIX_SPAWN_SETSID 0x0400
6262#define POSIX_SPAWN_CLOEXEC_DEFAULT 0x4000
6363
64#define _POSIX_SPAWN_RESLIDE 0x0800
65
6664/*
6765 * Possible values to be set for the process control actions on resource starvation.
6866 * POSIX_SPAWN_PCONTROL_THROTTLE indicates that the process is to be throttled on starvation.
lib/libc/include/x86_64-macos-gnu/sys/stat.h+1-3
......@@ -361,7 +361,6 @@ struct stat64 __DARWIN_STRUCT_STAT64;
361361
362362#endif
363363
364#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
365364/*
366365 * Extended flags ("EF") returned by ATTR_CMNEXT_EXT_FLAGS from getattrlist/getattrlistbulk
367366 */
......@@ -370,8 +369,7 @@ struct stat64 __DARWIN_STRUCT_STAT64;
370369#define EF_IS_SYNC_ROOT 0x00000004 /* file is a sync root for iCloud */
371370#define EF_IS_PURGEABLE 0x00000008 /* file is purgeable */
372371#define EF_IS_SPARSE 0x00000010 /* file has at least one sparse region */
373#define EF_IS_SYNTHETIC 0x00000020 /* a synthetic directory/symlink */
374#endif
372
375373
376374
377375
lib/libc/include/x86_64-macos-gnu/sys/sysctl.h+7-11
......@@ -553,8 +553,8 @@ extern struct loadavg averunnable;
553553/*
554554 * CTL_HW identifiers
555555 */
556#define HW_MACHINE 1 /* string: machine class (deprecated: use HW_PRODUCT) */
557#define HW_MODEL 2 /* string: specific machine model (deprecated: use HW_TARGET) */
556#define HW_MACHINE 1 /* string: machine class */
557#define HW_MODEL 2 /* string: specific machine model */
558558#define HW_NCPU 3 /* int: number of cpus */
559559#define HW_BYTEORDER 4 /* int: machine byte order */
560560#define HW_PHYSMEM 5 /* int: total memory */
......@@ -578,14 +578,12 @@ extern struct loadavg averunnable;
578578#define HW_TB_FREQ 23 /* int: Bus Frequency */
579579#define HW_MEMSIZE 24 /* uint64_t: physical ram size */
580580#define HW_AVAILCPU 25 /* int: number of available CPUs */
581#define HW_TARGET 26 /* string: model identifier */
582#define HW_PRODUCT 27 /* string: product identifier */
583#define HW_MAXID 28 /* number of valid hw ids */
581#define HW_MAXID 26 /* number of valid hw ids */
584582
585583#define CTL_HW_NAMES { \
586584 { 0, 0 }, \
587 { "machine", CTLTYPE_STRING }, /* Deprecated: use hw.product */ \
588 { "model", CTLTYPE_STRING }, /* Deprecated: use hw.target */ \
585 { "machine", CTLTYPE_STRING }, \
586 { "model", CTLTYPE_STRING }, \
589587 { "ncpu", CTLTYPE_INT }, \
590588 { "byteorder", CTLTYPE_INT }, \
591589 { "physmem", CTLTYPE_INT }, \
......@@ -608,9 +606,7 @@ extern struct loadavg averunnable;
608606 { "l3cachesize", CTLTYPE_INT }, \
609607 { "tbfrequency", CTLTYPE_INT }, \
610608 { "memsize", CTLTYPE_QUAD }, \
611 { "availcpu", CTLTYPE_INT }, \
612 { "target", CTLTYPE_STRING }, \
613 { "product", CTLTYPE_STRING }, \
609 { "availcpu", CTLTYPE_INT } \
614610}
615611
616612/*
......@@ -759,7 +755,7 @@ extern struct loadavg averunnable;
759755#define CTL_DEBUG_MAXID 20
760756
761757
762#if (CTL_MAXID != 9) || (KERN_MAXID != 72) || (VM_MAXID != 6) || (HW_MAXID != 28) || (USER_MAXID != 21) || (CTL_DEBUG_MAXID != 20)
758#if (CTL_MAXID != 9) || (KERN_MAXID != 72) || (VM_MAXID != 6) || (HW_MAXID != 26) || (USER_MAXID != 21) || (CTL_DEBUG_MAXID != 20)
763759#error Use the SYSCTL_*() macros and OID_AUTO instead!
764760#endif
765761
lib/libc/include/x86_64-macos-gnu/sys/syslimits.h+1-9
......@@ -68,19 +68,11 @@
6868#include <sys/cdefs.h>
6969
7070#if !defined(_ANSI_SOURCE)
71
72/* max bytes for an exec function */
73#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
74#define ARG_MAX (1024 * 1024)
75#else
76#define ARG_MAX (256 * 1024)
77#endif
78
7971/*
8072 * Note: CHILD_MAX *must* be less than hard_maxproc, which is set at
8173 * compile time; you *cannot* set it higher than the hard limit!!
8274 */
83
75#define ARG_MAX (256 * 1024) /* max bytes for an exec function */
8476#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
8577#define CHILD_MAX 266 /* max simultaneous processes */
8678#define GID_MAX 2147483647U /* max value for a gid_t (2^31-2) */
lib/libc/include/x86_64-macos-gnu/sys/uio.h+2-13
......@@ -1,5 +1,5 @@
11/*
2 * Copyright (c) 2000-2019 Apple Inc. All rights reserved.
2 * Copyright (c) 2000-2008 Apple Inc. All rights reserved.
33 *
44 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55 *
......@@ -64,10 +64,8 @@
6464#ifndef _SYS_UIO_H_
6565#define _SYS_UIO_H_
6666
67#include <Availability.h>
6867#include <sys/cdefs.h>
6968#include <sys/_types.h>
70#include <sys/_types/_off_t.h>
7169
7270/*
7371 * [XSI] The ssize_t and size_t types shall be defined as described
......@@ -78,7 +76,7 @@
7876
7977/*
8078 * [XSI] Structure whose address is passed as the second parameter to the
81 * readv(), preadv(), writev() and pwritev() functions.
79 * readv() and writev() functions.
8280 */
8381#include <sys/_types/_iovec_t.h>
8482
......@@ -97,15 +95,6 @@ enum uio_rw { UIO_READ, UIO_WRITE };
9795__BEGIN_DECLS
9896ssize_t readv(int, const struct iovec *, int) __DARWIN_ALIAS_C(readv);
9997ssize_t writev(int, const struct iovec *, int) __DARWIN_ALIAS_C(writev);
100
101#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE)
102
103ssize_t preadv(int, const struct iovec *, int, off_t) __DARWIN_NOCANCEL(preadv) __API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));
104ssize_t pwritev(int, const struct iovec *, int, off_t) __DARWIN_NOCANCEL(pwritev) __API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));
105
106#endif /* #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) */
107
10898__END_DECLS
10999
110
111100#endif /* !_SYS_UIO_H_ */
lib/libc/include/x86_64-macos-gnu/sys/un.h-1
......@@ -90,7 +90,6 @@ struct sockaddr_un {
9090#define LOCAL_PEEREPID 0x003 /* retrieve eff. peer pid */
9191#define LOCAL_PEERUUID 0x004 /* retrieve peer UUID */
9292#define LOCAL_PEEREUUID 0x005 /* retrieve eff. peer UUID */
93#define LOCAL_PEERTOKEN 0x006 /* retrieve peer audit token */
9493
9594#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
9695
lib/libc/include/x86_64-macos-gnu/xlocale/_inttypes.h-1
......@@ -26,7 +26,6 @@
2626
2727#include <sys/cdefs.h>
2828#include <stdint.h>
29#include <stddef.h> /* wchar_t */
3029#include <_xlocale.h>
3130
3231__BEGIN_DECLS
lib/libc/include/x86_64-macos-gnu/xlocale/_wchar.h-2
......@@ -27,8 +27,6 @@
2727#include <_stdio.h>
2828#include <_xlocale.h>
2929#include <sys/_types/_mbstate_t.h>
30#include <sys/_types/_wint_t.h>
31#include <stddef.h> /* wchar_t */
3230
3331/* Initially added in Issue 4 */
3432__BEGIN_DECLS
lib/libc/include/x86_64-macos-gnu/xpc/availability.h-4
......@@ -6,10 +6,6 @@
66// Certain parts of the project use all the project's headers but have to build
77// against newer OSX SDKs than ebuild uses -- liblaunch_host being the example.
88// So we need to define these.
9#ifndef __MAC_10_16
10#define __MAC_10_16 101600
11#endif // __MAC_10_16
12
139#ifndef __MAC_10_15
1410#define __MAC_10_15 101500
1511#define __AVAILABILITY_INTERNAL__MAC_10_15 \
lib/libc/include/x86_64-macos-gnu/xpc/base.h-2
......@@ -29,8 +29,6 @@ __BEGIN_DECLS
2929#include <Availability.h>
3030#endif // __has_include(<xpc/availability.h>)
3131
32#include <os/availability.h>
33
3432#ifndef __XPC_INDIRECT__
3533#error "Please #include <xpc/xpc.h> instead of this file directly."
3634#endif // __XPC_INDIRECT__
lib/libc/include/x86_64-macos-gnu/xpc/connection.h+4-5
......@@ -542,11 +542,10 @@ xpc_connection_send_message_with_reply(xpc_connection_t connection,
542542 * You are responsible for releasing the returned object.
543543 *
544544 * @discussion
545 * This API supports priority inversion avoidance, and should be used instead of
546 * combining xpc_connection_send_message_with_reply() with a semaphore.
547 *
548 * Invoking this API from a queue that is a part of the target queue hierarchy
549 * results in deadlocks under certain conditions.
545 * This API is primarily for transitional purposes. Its implementation is
546 * conceptually equivalent to calling xpc_connection_send_message_with_reply()
547 * and then immediately blocking the calling thread on a semaphore and
548 * signaling the semaphore from the reply block.
550549 *
551550 * Be judicious about your use of this API. It can block indefinitely, so if you
552551 * are using it to implement an API that can be called from the main thread, you
lib/libc/include/x86_64-macos-gnu/xpc/xpc.h+4-42
......@@ -1,4 +1,4 @@
1// Copyright (c) 2009-2020 Apple Inc. All rights reserved.
1// Copyright (c) 2009-2011 Apple Inc. All rights reserved.
22
33#ifndef __XPC_H__
44#define __XPC_H__
......@@ -37,7 +37,7 @@ __BEGIN_DECLS
3737#define __OSX_AVAILABLE_STARTING(x, y)
3838#endif // __OSX_AVAILABLE_STARTING
3939
40#define XPC_API_VERSION 20200610
40#define XPC_API_VERSION 20121012
4141
4242/*!
4343 * @typedef xpc_type_t
......@@ -76,7 +76,8 @@ OS_OBJECT_DECL(xpc_object);
7676XPC_INLINE XPC_NONNULL_ALL
7777void
7878_xpc_object_validate(xpc_object_t object) {
79 (void)*(unsigned long volatile *)(OS_OBJECT_BRIDGE void *)object;
79 void *isa = *(void * volatile *)(OS_OBJECT_BRIDGE void *)object;
80 (void)isa;
8081}
8182#else // OS_OBJECT_USE_OBJC
8283typedef void * xpc_object_t;
......@@ -1168,23 +1169,6 @@ XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT
11681169xpc_object_t
11691170xpc_array_create(const xpc_object_t _Nonnull * _Nullable objects, size_t count);
11701171
1171/*!
1172 * @function xpc_array_create_empty
1173 *
1174 * @abstract
1175 * Creates an XPC object representing an array of XPC objects.
1176 *
1177 * @result
1178 * A new array object.
1179 *
1180 * @see
1181 * xpc_array_create
1182 */
1183API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
1184XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT
1185xpc_object_t
1186xpc_array_create_empty(void);
1187
11881172/*!
11891173 * @function xpc_array_set_value
11901174 *
......@@ -1914,24 +1898,6 @@ xpc_object_t
19141898xpc_dictionary_create(const char * _Nonnull const * _Nullable keys,
19151899 const xpc_object_t _Nullable * _Nullable values, size_t count);
19161900
1917/*!
1918 * @function xpc_dictionary_create_empty
1919 *
1920 * @abstract
1921 * Creates an XPC object representing a dictionary of XPC objects keyed to
1922 * C-strings.
1923 *
1924 * @result
1925 * The new dictionary object.
1926 *
1927 * @see
1928 * xpc_dictionary_create
1929 */
1930API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
1931XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT
1932xpc_object_t
1933xpc_dictionary_create_empty(void);
1934
19351901/*!
19361902 * @function xpc_dictionary_create_reply
19371903 *
......@@ -2682,10 +2648,6 @@ xpc_transaction_end(void);
26822648 * @discussion
26832649 * Multiple calls to this function for the same event stream will result in
26842650 * undefined behavior.
2685 *
2686 * There is no API to pause delivery of XPC events. If a process that
2687 * has set an XPC event handler exits, events may be dropped due to races
2688 * between the event handler running and the process exiting.
26892651 */
26902652#if __BLOCKS__
26912653__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)