peachsim 0.1.1674 → 0.1.1684

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/cli/commands/control.ts +13 -1
  2. package/cli/commands/coverage-swift.ts +83 -27
  3. package/cli/commands/coverage.ts +219 -20
  4. package/cli/commands/detect.ts +10 -6
  5. package/cli/commands/inspect/core.ts +2 -0
  6. package/cli/commands/inspect/wait-ready.ts +7 -0
  7. package/cli/outbound-endpoints.ts +12 -0
  8. package/detox/index.ts +11 -1
  9. package/detox/jest-environment.cjs +14 -0
  10. package/dist-lib/agent-daemon-client.cjs +1 -1
  11. package/dist-lib/agent-events.cjs +1 -1
  12. package/dist-lib/attached-projects.cjs +1 -1
  13. package/dist-lib/auth/shared-session.cjs +1 -1
  14. package/dist-lib/backend-origin.cjs +1 -1
  15. package/dist-lib/beta.cjs +1 -1
  16. package/dist-lib/beta.mjs +1 -1
  17. package/dist-lib/bridge-constants.cjs +1 -1
  18. package/dist-lib/bridge-contract-input.cjs +1 -1
  19. package/dist-lib/bridge-contract-input.mjs +1 -1
  20. package/dist-lib/bridge-contract.cjs +1 -1
  21. package/dist-lib/bridge-contract.mjs +1 -1
  22. package/dist-lib/bundle-channel.cjs +3274 -1663
  23. package/dist-lib/capture-contract.cjs +1 -1
  24. package/dist-lib/capture-contract.mjs +1 -1
  25. package/dist-lib/cloud-contract.cjs +1 -1
  26. package/dist-lib/cloud-contract.mjs +1 -1
  27. package/dist-lib/cloud-test-args.cjs +1 -1
  28. package/dist-lib/cloud-test-args.mjs +1 -1
  29. package/dist-lib/cloud.cjs +1 -1
  30. package/dist-lib/cloud.mjs +1 -1
  31. package/dist-lib/config.cjs +1 -1
  32. package/dist-lib/config.mjs +1 -1
  33. package/dist-lib/detox/index.cjs +6 -4
  34. package/dist-lib/detox/jest-environment.cjs +14 -0
  35. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  36. package/dist-lib/expo-swift-bundle.cjs +2407 -1126
  37. package/dist-lib/expo-swift-metadata.cjs +1 -1
  38. package/dist-lib/expo-swift-metadata.mjs +1 -1
  39. package/dist-lib/home-paths.cjs +1 -1
  40. package/dist-lib/host/bridge-host.cjs +2879 -1598
  41. package/dist-lib/host/fetch-proxy-handler.cjs +18 -5
  42. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  43. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  44. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  45. package/dist-lib/host/websocket-proxy.cjs +1 -1
  46. package/dist-lib/index.cjs +1904 -741
  47. package/dist-lib/jump-to-source-babel.cjs +1 -1
  48. package/dist-lib/jump-to-source-native.cjs +1 -1
  49. package/dist-lib/kotlin-host.cjs +1 -1
  50. package/dist-lib/menu.cjs +1 -1
  51. package/dist-lib/menu.mjs +1 -1
  52. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  53. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  54. package/dist-lib/metro-production-bundle.cjs +1 -1
  55. package/dist-lib/metro-production-bundle.mjs +1 -1
  56. package/dist-lib/metro.cjs +6215 -4283
  57. package/dist-lib/native-app-identity-project.cjs +31 -6
  58. package/dist-lib/native-app-identity-project.mjs +31 -6
  59. package/dist-lib/native-app-identity.cjs +1 -1
  60. package/dist-lib/native-app-identity.mjs +1 -1
  61. package/dist-lib/native-firebase-metadata.cjs +1 -1
  62. package/dist-lib/native-firebase-metadata.mjs +1 -1
  63. package/dist-lib/plist.cjs +1 -1
  64. package/dist-lib/plist.mjs +1 -1
  65. package/dist-lib/profiles.cjs +1 -1
  66. package/dist-lib/public-brand.cjs +1 -1
  67. package/dist-lib/public-origins-lib-esm.json +24 -23
  68. package/dist-lib/public-origins-lib-static.json +1 -1
  69. package/dist-lib/public-origins-lib.json +134 -78
  70. package/dist-lib/react-native-host-modules.cjs +1 -1
  71. package/dist-lib/react-native-host-modules.mjs +1 -1
  72. package/dist-lib/reap-browser.cjs +2 -2
  73. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  74. package/dist-lib/sdk.cjs +2 -1
  75. package/dist-lib/sdk.mjs +2 -1
  76. package/dist-lib/skills.cjs +3570 -2160
  77. package/dist-lib/swift-compile.cjs +473 -351
  78. package/dist-lib/swift-compile.mjs +471 -349
  79. package/dist-lib/swift-package.cjs +36 -6
  80. package/dist-lib/swift-package.mjs +35 -6
  81. package/dist-lib/swift-submit.cjs +1 -1
  82. package/dist-lib/swift-submit.mjs +1 -1
  83. package/dist-lib/swift-toolchain.cjs +26 -11
  84. package/dist-lib/swift.cjs +1 -1
  85. package/dist-lib/vite-swift.cjs +2418 -1132
  86. package/dist-lib/vite.cjs +1907 -766
  87. package/dist-lib/worklet-executable.cjs +1 -1
  88. package/dist-lib/worklet-executable.mjs +1 -1
  89. package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -1
  90. package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +9 -1
  91. package/dist-types/packages/peach-engine/src/preview/upload-protocol.d.ts +11 -3
  92. package/dist-types/packages/peach-engine/src/webview-automation-host.d.ts +6 -0
  93. package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +2 -0
  94. package/package.json +1 -1
  95. package/runtime-companion.json +1 -1
  96. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +51 -2
  97. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +21 -0
  98. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFComposeAssistantViewController.h +29 -0
  99. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeControllerDeferredAction.h +14 -0
  100. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeViewController.h +162 -0
  101. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailDraft.h +24 -0
  102. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController+UPI.h +31 -0
  103. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController.h +169 -0
  104. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MessageUI.h +13 -0
  105. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Modules/module.modulemap +11 -0
  106. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +10 -0
  107. package/sdk/ios/usr/include/arm/param.h +151 -0
  108. package/sdk/ios/usr/include/dispatch/dispatch.h +3 -0
  109. package/sdk/ios/usr/include/dlfcn.h +1 -2
  110. package/sdk/ios/usr/include/machine/param.h +42 -0
  111. package/sdk/ios/usr/include/net/if.h +1 -2
  112. package/sdk/ios/usr/include/peach/pthread.h +4 -4
  113. package/sdk/ios/usr/include/pthread/qos.h +304 -0
  114. package/sdk/ios/usr/include/sys/_types/_fd_clr.h +31 -0
  115. package/sdk/ios/usr/include/sys/_types/_fd_copy.h +31 -0
  116. package/sdk/ios/usr/include/sys/_types/_fd_def.h +121 -0
  117. package/sdk/ios/usr/include/sys/_types/_fd_isset.h +31 -0
  118. package/sdk/ios/usr/include/sys/_types/_fd_set.h +31 -0
  119. package/sdk/ios/usr/include/sys/_types/_fd_setsize.h +31 -0
  120. package/sdk/ios/usr/include/sys/_types/_fd_zero.h +31 -0
  121. package/sdk/ios/usr/include/sys/cdefs.h +3 -0
  122. package/sdk/ios/usr/include/sys/param.h +235 -0
  123. package/sdk/ios/usr/include/sys/proc.h +1 -0
  124. package/sdk/ios/usr/include/sys/qos.h +151 -12
  125. package/sdk/ios/wasm/include/__typedef_sigset_t.h +7 -0
  126. package/sdk/ios/wasm/include/fcntl.h +11 -0
  127. package/sdk/ios/wasm/include/mach/machine/boolean.h +2 -0
  128. package/sdk/ios/wasm/include/mach/machine/exception.h +5 -0
  129. package/sdk/ios/wasm/include/mach/machine/kern_return.h +2 -0
  130. package/sdk/ios/wasm/include/mach/machine/processor_info.h +2 -0
  131. package/sdk/ios/wasm/include/mach/machine/rpc.h +2 -0
  132. package/sdk/ios/wasm/include/mach/machine/thread_state.h +3 -0
  133. package/sdk/ios/wasm/include/mach/machine/thread_status.h +3 -0
  134. package/sdk/ios/wasm/include/mach/machine/vm_param.h +3 -0
  135. package/sdk/ios/wasm/include/mach/machine/vm_types.h +18 -0
  136. package/sdk/ios/wasm/include/machine/_types.h +153 -0
  137. package/sdk/ios/wasm/include/machine/endian.h +2 -0
  138. package/sdk/ios/wasm/include/machine/limits.h +2 -0
  139. package/sdk/ios/wasm/include/machine/types.h +30 -0
  140. package/sdk/ios/wasm/include/poll.h +8 -0
  141. package/sdk/ios/wasm/include/pthread.h +50 -0
  142. package/sdk/ios/wasm/include/signal.h +72 -0
  143. package/sdk/ios/wasm/include/stdlib.h +3 -0
  144. package/sdk/ios/wasm/include/string.h +10 -0
  145. package/sdk/ios/wasm/include/sys/_pthread/_pthread_attr_t.h +7 -0
  146. package/sdk/ios/wasm/include/sys/_pthread/_pthread_t.h +7 -0
  147. package/sdk/ios/wasm/include/sys/mman.h +122 -0
  148. package/sdk/ios/wasm/include/sys/select.h +37 -0
  149. package/sdk/ios/wasm/include/sys/signal.h +259 -0
  150. package/sdk/ios/wasm/include/sys/socket.h +8 -0
  151. package/sdk/ios/wasm/include/sys/types.h +14 -0
  152. package/sdk/ios/wasm/include/sys/ucontext.h +1 -0
  153. package/sdk/ios/wasm/include/sys/uio.h +11 -0
  154. package/sdk/ios/wasm/include/sys/wait.h +89 -0
  155. package/sdk/ios/wasm/include/time.h +8 -0
  156. package/sdk/ios/wasm/include/unistd.h +17 -0
  157. package/src/bridge-contract.ts +2 -0
  158. package/src/chromium-admission.ts +10 -5
  159. package/src/device-catalog.ts +4 -4
  160. package/src/host/fetch-proxy-handler.ts +20 -0
  161. package/src/metro-plugin.ts +5 -2
  162. package/src/nitro-adapter.lock.json +6 -6
  163. package/src/nitro-compile.ts +63 -2
  164. package/src/numbered-lock.ts +72 -0
  165. package/src/react-native-coverage/capability-reference-resolution.ts +62 -5
  166. package/src/react-native-coverage/capability-source-references.ts +50 -13
  167. package/src/react-native-coverage/native-source-credit.ts +126 -0
  168. package/src/react-native-coverage/native-source-ranges-file.ts +38 -0
  169. package/src/react-native-coverage/native-surface.ts +49 -0
  170. package/src/react-native-coverage/verified-reach.ts +22 -2
  171. package/src/runtime-assets.ts +17 -0
  172. package/src/swift-compile.ts +84 -48
  173. package/src/swift-coverage/indexing.ts +17 -1
  174. package/src/swift-coverage/sdk.ts +71 -0
  175. package/src/swift-coverage/source.ts +74 -2
  176. package/src/swift-coverage/types.ts +6 -0
  177. package/src/swift-distribution.lock.json +12 -12
  178. package/src/swift-host.ts +133 -14
  179. package/src/swift-objc-compile.ts +6 -21
  180. package/src/swift-objc-metadata.ts +2 -8
  181. package/src/swift-objc-platform.ts +53 -0
  182. package/src/swift-objc-standin.ts +45 -1
  183. package/src/swift-package-manifest.ts +48 -3
  184. package/src/swift-package.ts +59 -9
  185. package/src/swift-packages.ts +157 -44
  186. package/src/swift-source-pods.ts +288 -0
  187. package/src/swift-toolchain.ts +32 -10
  188. package/src/vite-plugin-one.ts +5 -4
  189. package/src/worker-system-chunks.ts +7 -1
  190. package/src/xcode-project.ts +40 -11
@@ -0,0 +1,304 @@
1
+ /*
2
+ * Copyright (c) 2013-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
+ #ifndef _PTHREAD_QOS_H
25
+ #define _PTHREAD_QOS_H
26
+
27
+ #include <sys/cdefs.h>
28
+ #include <sys/_pthread/_pthread_attr_t.h> /* pthread_attr_t */
29
+ #include <sys/_pthread/_pthread_t.h> /* pthread_t */
30
+ #include <Availability.h>
31
+
32
+ #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
33
+
34
+ #include <sys/qos.h>
35
+
36
+ #ifndef KERNEL
37
+
38
+ #if __has_feature(assume_nonnull)
39
+ _Pragma("clang assume_nonnull begin")
40
+ #endif
41
+ __BEGIN_DECLS
42
+
43
+ /*!
44
+ * @function pthread_attr_set_qos_class_np
45
+ *
46
+ * @abstract
47
+ * Sets the QOS class and relative priority of a pthread attribute structure
48
+ * which may be used to specify the requested QOS class of newly created
49
+ * threads.
50
+ *
51
+ * @discussion
52
+ * The QOS class and relative priority represent an overall combination of
53
+ * system quality of service attributes on a thread.
54
+ *
55
+ * Subsequent calls to interfaces such as pthread_attr_setschedparam() that are
56
+ * incompatible or in conflict with the QOS class system will unset the QOS
57
+ * class requested with this interface and pthread_attr_get_qos_class_np() will
58
+ * return QOS_CLASS_UNSPECIFIED.
59
+ *
60
+ * @param __attr
61
+ * The pthread attribute structure to modify.
62
+ *
63
+ * @param __qos_class
64
+ * A QOS class value:
65
+ * - QOS_CLASS_USER_INTERACTIVE
66
+ * - QOS_CLASS_USER_INITIATED
67
+ * - QOS_CLASS_DEFAULT
68
+ * - QOS_CLASS_UTILITY
69
+ * - QOS_CLASS_BACKGROUND
70
+ * EINVAL will be returned if any other value is provided.
71
+ *
72
+ * @param __relative_priority
73
+ * A relative priority within the QOS class. This value is a negative offset
74
+ * from the maximum supported scheduler priority for the given class.
75
+ * EINVAL will be returned if the value is greater than zero or less than
76
+ * QOS_MIN_RELATIVE_PRIORITY.
77
+ *
78
+ * @return
79
+ * Zero if successful, otherwise an errno value.
80
+ */
81
+ __API_AVAILABLE(macos(10.10), ios(8.0))
82
+ int
83
+ pthread_attr_set_qos_class_np(pthread_attr_t *__attr,
84
+ qos_class_t __qos_class, int __relative_priority);
85
+
86
+ /*!
87
+ * @function pthread_attr_get_qos_class_np
88
+ *
89
+ * @abstract
90
+ * Gets the QOS class and relative priority of a pthread attribute structure.
91
+ *
92
+ * @param __attr
93
+ * The pthread attribute structure to inspect.
94
+ *
95
+ * @param __qos_class
96
+ * On output, a QOS class value:
97
+ * - QOS_CLASS_USER_INTERACTIVE
98
+ * - QOS_CLASS_USER_INITIATED
99
+ * - QOS_CLASS_DEFAULT
100
+ * - QOS_CLASS_UTILITY
101
+ * - QOS_CLASS_BACKGROUND
102
+ * - QOS_CLASS_UNSPECIFIED
103
+ * This value may be NULL in which case no value is returned.
104
+ *
105
+ * @param __relative_priority
106
+ * On output, a relative priority offset within the QOS class.
107
+ * This value may be NULL in which case no value is returned.
108
+ *
109
+ * @return
110
+ * Zero if successful, otherwise an errno value.
111
+ */
112
+ __API_AVAILABLE(macos(10.10), ios(8.0))
113
+ int
114
+ pthread_attr_get_qos_class_np(pthread_attr_t * __restrict __attr,
115
+ qos_class_t * _Nullable __restrict __qos_class,
116
+ int * _Nullable __restrict __relative_priority);
117
+
118
+ /*!
119
+ * @function pthread_set_qos_class_self_np
120
+ *
121
+ * @abstract
122
+ * Sets the requested QOS class and relative priority of the current thread.
123
+ *
124
+ * @discussion
125
+ * The QOS class and relative priority represent an overall combination of
126
+ * system quality of service attributes on a thread.
127
+ *
128
+ * Subsequent calls to interfaces such as pthread_setschedparam() that are
129
+ * incompatible or in conflict with the QOS class system will unset the QOS
130
+ * class requested with this interface and pthread_get_qos_class_np() will
131
+ * return QOS_CLASS_UNSPECIFIED thereafter. A thread so modified is permanently
132
+ * opted-out of the QOS class system and calls to this function to request a QOS
133
+ * class for such a thread will fail and return EPERM.
134
+ *
135
+ * @param __qos_class
136
+ * A QOS class value:
137
+ * - QOS_CLASS_USER_INTERACTIVE
138
+ * - QOS_CLASS_USER_INITIATED
139
+ * - QOS_CLASS_DEFAULT
140
+ * - QOS_CLASS_UTILITY
141
+ * - QOS_CLASS_BACKGROUND
142
+ * EINVAL will be returned if any other value is provided.
143
+ *
144
+ * @param __relative_priority
145
+ * A relative priority within the QOS class. This value is a negative offset
146
+ * from the maximum supported scheduler priority for the given class.
147
+ * EINVAL will be returned if the value is greater than zero or less than
148
+ * QOS_MIN_RELATIVE_PRIORITY.
149
+ *
150
+ * @return
151
+ * Zero if successful, otherwise an errno value.
152
+ */
153
+ __API_AVAILABLE(macos(10.10), ios(8.0))
154
+ int
155
+ pthread_set_qos_class_self_np(qos_class_t __qos_class,
156
+ int __relative_priority);
157
+
158
+ /*!
159
+ * @function pthread_get_qos_class_np
160
+ *
161
+ * @abstract
162
+ * Gets the requested QOS class and relative priority of a thread.
163
+ *
164
+ * @param __pthread
165
+ * The target thread to inspect.
166
+ *
167
+ * @param __qos_class
168
+ * On output, a QOS class value:
169
+ * - QOS_CLASS_USER_INTERACTIVE
170
+ * - QOS_CLASS_USER_INITIATED
171
+ * - QOS_CLASS_DEFAULT
172
+ * - QOS_CLASS_UTILITY
173
+ * - QOS_CLASS_BACKGROUND
174
+ * - QOS_CLASS_UNSPECIFIED
175
+ * This value may be NULL in which case no value is returned.
176
+ *
177
+ * @param __relative_priority
178
+ * On output, a relative priority offset within the QOS class.
179
+ * This value may be NULL in which case no value is returned.
180
+ *
181
+ * @return
182
+ * Zero if successful, otherwise an errno value.
183
+ */
184
+ __API_AVAILABLE(macos(10.10), ios(8.0))
185
+ int
186
+ pthread_get_qos_class_np(pthread_t __pthread,
187
+ qos_class_t * _Nullable __restrict __qos_class,
188
+ int * _Nullable __restrict __relative_priority);
189
+
190
+ /*!
191
+ * @typedef pthread_override_t
192
+ *
193
+ * @abstract
194
+ * An opaque object representing a QOS class override of a thread.
195
+ *
196
+ * @discussion
197
+ * A QOS class override of a target thread expresses that an item of pending
198
+ * work classified with a specific QOS class and relative priority depends on
199
+ * the completion of the work currently being executed by the thread (e.g. due
200
+ * to ordering requirements).
201
+ *
202
+ * While overrides are in effect, the target thread will execute at the maximum
203
+ * QOS class and relative priority of all overrides and of the QOS class
204
+ * requested by the thread itself.
205
+ *
206
+ * A QOS class override does not modify the target thread's requested QOS class
207
+ * value and the effect of an override is not visible to the qos_class_self()
208
+ * and pthread_get_qos_class_np() interfaces.
209
+ */
210
+
211
+ typedef struct pthread_override_s* pthread_override_t;
212
+
213
+ /*!
214
+ * @function pthread_override_qos_class_start_np
215
+ *
216
+ * @abstract
217
+ * Starts a QOS class override of the specified target thread.
218
+ *
219
+ * @discussion
220
+ * Starting a QOS class override of the specified target thread expresses that
221
+ * an item of pending work classified with the specified QOS class and relative
222
+ * priority depends on the completion of the work currently being executed by
223
+ * the thread (e.g. due to ordering requirements).
224
+ *
225
+ * While overrides are in effect, the specified target thread will execute at
226
+ * the maximum QOS class and relative priority of all overrides and of the QOS
227
+ * class requested by the thread itself.
228
+ *
229
+ * Starting a QOS class override does not modify the target thread's requested
230
+ * QOS class value and the effect of an override is not visible to the
231
+ * qos_class_self() and pthread_get_qos_class_np() interfaces.
232
+ *
233
+ * The returned newly allocated override object is intended to be associated
234
+ * with the item of pending work in question. Once the dependency has been
235
+ * satisfied and enabled that work to begin executing, the QOS class override
236
+ * must be ended by passing the associated override object to
237
+ * pthread_override_qos_class_end_np(). Failure to do so will result in the
238
+ * associated resources to be leaked and the target thread to be permanently
239
+ * executed at an inappropriately elevated QOS class.
240
+ *
241
+ * @param __pthread
242
+ * The target thread to modify.
243
+ *
244
+ * @param __qos_class
245
+ * A QOS class value:
246
+ * - QOS_CLASS_USER_INTERACTIVE
247
+ * - QOS_CLASS_USER_INITIATED
248
+ * - QOS_CLASS_DEFAULT
249
+ * - QOS_CLASS_UTILITY
250
+ * - QOS_CLASS_BACKGROUND
251
+ * NULL will be returned if any other value is provided.
252
+ *
253
+ * @param __relative_priority
254
+ * A relative priority within the QOS class. This value is a negative offset
255
+ * from the maximum supported scheduler priority for the given class.
256
+ * NULL will be returned if the value is greater than zero or less than
257
+ * QOS_MIN_RELATIVE_PRIORITY.
258
+ *
259
+ * @return
260
+ * A newly allocated override object if successful, or NULL if the override
261
+ * could not be started.
262
+ */
263
+ __API_AVAILABLE(macos(10.10), ios(8.0))
264
+ pthread_override_t
265
+ pthread_override_qos_class_start_np(pthread_t __pthread,
266
+ qos_class_t __qos_class, int __relative_priority);
267
+
268
+ /*!
269
+ * @function pthread_override_qos_class_end_np
270
+ *
271
+ * @abstract
272
+ * Ends a QOS class override.
273
+ *
274
+ * @discussion
275
+ * Passing an override object returned by pthread_override_qos_class_start_np()
276
+ * ends the QOS class override started by that call and deallocates all
277
+ * associated resources as well as the override object itself.
278
+ *
279
+ * The thread starting and the thread ending a QOS class override need not be
280
+ * identical. If the thread ending the override is the the target thread of the
281
+ * override itself, it should take care to elevate its requested QOS class
282
+ * appropriately with pthread_set_qos_class_self_np() before ending the
283
+ * override.
284
+ *
285
+ * @param __override
286
+ * An override object returned by pthread_override_qos_class_start_np().
287
+ *
288
+ * @return
289
+ * Zero if successful, otherwise an errno value.
290
+ */
291
+ __API_AVAILABLE(macos(10.10), ios(8.0))
292
+ int
293
+ pthread_override_qos_class_end_np(pthread_override_t __override);
294
+
295
+ __END_DECLS
296
+ #if __has_feature(assume_nonnull)
297
+ _Pragma("clang assume_nonnull end")
298
+ #endif
299
+
300
+ #endif // KERNEL
301
+
302
+ #endif // __DARWIN_C_LEVEL >= __DARWIN_C_FULL
303
+
304
+ #endif // _PTHREAD_QOS_H
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Copyright (c) 2003-2012 Apple 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
+ #ifndef FD_CLR
29
+ #include <sys/_types/_fd_def.h>
30
+ #define FD_CLR(n, p) __DARWIN_FD_CLR(n, p)
31
+ #endif /* FD_CLR */
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Copyright (c) 2003-2012 Apple 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
+ #ifndef FD_COPY
29
+ #include <sys/_types/_fd_def.h>
30
+ #define FD_COPY(f, t) __DARWIN_FD_COPY(f, t)
31
+ #endif /* FD_COPY */
@@ -0,0 +1,121 @@
1
+ /*
2
+ * Copyright (c) 2003-2012 Apple 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
+ #ifndef _FD_SET
29
+ #define _FD_SET
30
+
31
+ #include <machine/types.h> /* __int32_t and uintptr_t */
32
+ #include <Availability.h>
33
+
34
+ /*
35
+ * Select uses bit masks of file descriptors in longs. These macros
36
+ * manipulate such bit fields (the filesystem macros use chars). The
37
+ * extra protection here is to permit application redefinition above
38
+ * the default size.
39
+ */
40
+ #ifdef FD_SETSIZE
41
+ #define __DARWIN_FD_SETSIZE FD_SETSIZE
42
+ #else /* !FD_SETSIZE */
43
+ #define __DARWIN_FD_SETSIZE 1024
44
+ #endif /* FD_SETSIZE */
45
+ #define __DARWIN_NBBY 8 /* bits in a byte */
46
+ #define __DARWIN_NFDBITS (sizeof(__int32_t) * __DARWIN_NBBY) /* bits per mask */
47
+ #define __DARWIN_howmany(x, y) ((((x) % (y)) == 0) ? ((x) / (y)) : (((x) / (y)) + 1)) /* # y's == x bits? */
48
+
49
+ __BEGIN_DECLS
50
+ typedef struct fd_set {
51
+ __int32_t fds_bits[__DARWIN_howmany(__DARWIN_FD_SETSIZE, __DARWIN_NFDBITS)];
52
+ } fd_set;
53
+
54
+ int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
55
+ __END_DECLS
56
+
57
+ __header_always_inline int
58
+ __darwin_check_fd_set(int _a, const void *_b)
59
+ {
60
+ #ifdef __clang__
61
+ #pragma clang diagnostic push
62
+ #pragma clang diagnostic ignored "-Wunguarded-availability-new"
63
+ #endif
64
+ if ((uintptr_t)&__darwin_check_fd_set_overflow != (uintptr_t) 0) {
65
+ #if defined(_DARWIN_UNLIMITED_SELECT) || defined(_DARWIN_C_SOURCE)
66
+ return __darwin_check_fd_set_overflow(_a, _b, 1);
67
+ #else
68
+ return __darwin_check_fd_set_overflow(_a, _b, 0);
69
+ #endif
70
+ } else {
71
+ return 1;
72
+ }
73
+ #ifdef __clang__
74
+ #pragma clang diagnostic pop
75
+ #endif
76
+ }
77
+
78
+ /* This inline avoids argument side-effect issues with FD_ISSET() */
79
+ __header_always_inline int
80
+ __darwin_fd_isset(int _fd, const struct fd_set *_p)
81
+ {
82
+ if (__darwin_check_fd_set(_fd, (const void *) _p)) {
83
+ return _p->fds_bits[(unsigned long)_fd / __DARWIN_NFDBITS] & ((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % __DARWIN_NFDBITS)));
84
+ }
85
+
86
+ return 0;
87
+ }
88
+
89
+ __header_always_inline void
90
+ __darwin_fd_set(int _fd, struct fd_set *const _p)
91
+ {
92
+ if (__darwin_check_fd_set(_fd, (const void *) _p)) {
93
+ (_p->fds_bits[(unsigned long)_fd / __DARWIN_NFDBITS] |= ((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % __DARWIN_NFDBITS))));
94
+ }
95
+ }
96
+
97
+ __header_always_inline void
98
+ __darwin_fd_clr(int _fd, struct fd_set *const _p)
99
+ {
100
+ if (__darwin_check_fd_set(_fd, (const void *) _p)) {
101
+ (_p->fds_bits[(unsigned long)_fd / __DARWIN_NFDBITS] &= ~((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % __DARWIN_NFDBITS))));
102
+ }
103
+ }
104
+
105
+
106
+ #define __DARWIN_FD_SET(n, p) __darwin_fd_set((n), (p))
107
+ #define __DARWIN_FD_CLR(n, p) __darwin_fd_clr((n), (p))
108
+ #define __DARWIN_FD_ISSET(n, p) __darwin_fd_isset((n), (p))
109
+
110
+ #if __GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 3
111
+ /*
112
+ * Use the built-in bzero function instead of the library version so that
113
+ * we do not pollute the namespace or introduce prototype warnings.
114
+ */
115
+ #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p)))
116
+ #else
117
+ #define __DARWIN_FD_ZERO(p) bzero(p, sizeof(*(p)))
118
+ #endif
119
+
120
+ #define __DARWIN_FD_COPY(f, t) bcopy(f, t, sizeof(*(f)))
121
+ #endif /* _FD_SET */
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Copyright (c) 2003-2012 Apple 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
+ #ifndef FD_ISSET
29
+ #include <sys/_types/_fd_def.h>
30
+ #define FD_ISSET(n, p) __DARWIN_FD_ISSET(n, p)
31
+ #endif /* FD_ISSET */
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Copyright (c) 2003-2012 Apple 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
+ #ifndef FD_SET
29
+ #include <sys/_types/_fd_def.h>
30
+ #define FD_SET(n, p) __DARWIN_FD_SET(n, p)
31
+ #endif /* FD_SET */
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Copyright (c) 2003-2012 Apple 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
+ #ifndef FD_SETSIZE
29
+ #include <sys/_types/_fd_def.h>
30
+ #define FD_SETSIZE __DARWIN_FD_SETSIZE
31
+ #endif /* FD_SETSIZE */
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Copyright (c) 2003-2012 Apple 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
+ #ifndef FD_ZERO
29
+ #include <sys/_types/_fd_def.h>
30
+ #define FD_ZERO(p) __DARWIN_FD_ZERO(p)
31
+ #endif /* FD_ZERO */
@@ -40,6 +40,9 @@
40
40
  #else
41
41
  #define __DARWIN_C_LEVEL __DARWIN_C_FULL
42
42
  #endif
43
+ #define __kernel_ptr_semantics
44
+ #define __kernel_data_semantics
45
+ #define __kernel_dual_semantics
43
46
  #define __unused __attribute__((__unused__))
44
47
  #define __used __attribute__((__used__))
45
48
  #define __deprecated __attribute__((__deprecated__))