peachsim 0.1.1673 → 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 (213) 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/settling.ts +37 -4
  7. package/cli/commands/inspect/wait-ready.ts +7 -0
  8. package/cli/outbound-endpoints.ts +12 -0
  9. package/detox/index.ts +11 -1
  10. package/detox/jest-environment.cjs +14 -0
  11. package/dist-lib/agent-daemon-client.cjs +1 -1
  12. package/dist-lib/agent-events.cjs +1 -1
  13. package/dist-lib/attached-projects.cjs +1 -1
  14. package/dist-lib/auth/shared-session.cjs +1 -1
  15. package/dist-lib/backend-origin.cjs +1 -1
  16. package/dist-lib/beta.cjs +1 -1
  17. package/dist-lib/beta.mjs +1 -1
  18. package/dist-lib/bridge-constants.cjs +1 -1
  19. package/dist-lib/bridge-contract-input.cjs +1 -1
  20. package/dist-lib/bridge-contract-input.mjs +1 -1
  21. package/dist-lib/bridge-contract.cjs +1 -1
  22. package/dist-lib/bridge-contract.mjs +1 -1
  23. package/dist-lib/bundle-channel.cjs +3299 -1665
  24. package/dist-lib/capture-contract.cjs +1 -1
  25. package/dist-lib/capture-contract.mjs +1 -1
  26. package/dist-lib/cloud-contract.cjs +1 -1
  27. package/dist-lib/cloud-contract.mjs +1 -1
  28. package/dist-lib/cloud-test-args.cjs +1 -1
  29. package/dist-lib/cloud-test-args.mjs +1 -1
  30. package/dist-lib/cloud.cjs +1 -1
  31. package/dist-lib/cloud.mjs +1 -1
  32. package/dist-lib/config.cjs +1 -1
  33. package/dist-lib/config.mjs +1 -1
  34. package/dist-lib/detox/index.cjs +43 -8
  35. package/dist-lib/detox/jest-environment.cjs +14 -0
  36. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  37. package/dist-lib/expo-swift-bundle.cjs +2432 -1128
  38. package/dist-lib/expo-swift-metadata.cjs +1 -1
  39. package/dist-lib/expo-swift-metadata.mjs +1 -1
  40. package/dist-lib/home-paths.cjs +1 -1
  41. package/dist-lib/host/bridge-host.cjs +2908 -1601
  42. package/dist-lib/host/fetch-proxy-handler.cjs +22 -6
  43. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  44. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  45. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  46. package/dist-lib/host/websocket-proxy.cjs +1 -1
  47. package/dist-lib/index.cjs +1941 -742
  48. package/dist-lib/jump-to-source-babel.cjs +1 -1
  49. package/dist-lib/jump-to-source-native.cjs +1 -1
  50. package/dist-lib/kotlin-host.cjs +1 -1
  51. package/dist-lib/menu.cjs +1 -1
  52. package/dist-lib/menu.mjs +1 -1
  53. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  54. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  55. package/dist-lib/metro-production-bundle.cjs +1 -1
  56. package/dist-lib/metro-production-bundle.mjs +1 -1
  57. package/dist-lib/metro.cjs +6215 -4283
  58. package/dist-lib/native-app-identity-project.cjs +31 -6
  59. package/dist-lib/native-app-identity-project.mjs +31 -6
  60. package/dist-lib/native-app-identity.cjs +1 -1
  61. package/dist-lib/native-app-identity.mjs +1 -1
  62. package/dist-lib/native-firebase-metadata.cjs +1 -1
  63. package/dist-lib/native-firebase-metadata.mjs +1 -1
  64. package/dist-lib/plist.cjs +1 -1
  65. package/dist-lib/plist.mjs +1 -1
  66. package/dist-lib/profiles.cjs +1 -1
  67. package/dist-lib/public-brand.cjs +1 -1
  68. package/dist-lib/public-origins-lib-esm.json +24 -23
  69. package/dist-lib/public-origins-lib-static.json +1 -1
  70. package/dist-lib/public-origins-lib.json +134 -78
  71. package/dist-lib/react-native-host-modules.cjs +1 -1
  72. package/dist-lib/react-native-host-modules.mjs +1 -1
  73. package/dist-lib/reap-browser.cjs +2 -2
  74. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  75. package/dist-lib/sdk.cjs +39 -5
  76. package/dist-lib/sdk.mjs +39 -5
  77. package/dist-lib/skills.cjs +3637 -2168
  78. package/dist-lib/swift-compile.cjs +496 -352
  79. package/dist-lib/swift-compile.mjs +494 -350
  80. package/dist-lib/swift-package.cjs +58 -9
  81. package/dist-lib/swift-package.mjs +57 -9
  82. package/dist-lib/swift-submit.cjs +1 -1
  83. package/dist-lib/swift-submit.mjs +1 -1
  84. package/dist-lib/swift-toolchain.cjs +26 -11
  85. package/dist-lib/swift.cjs +1 -1
  86. package/dist-lib/vite-swift.cjs +2443 -1134
  87. package/dist-lib/vite.cjs +1907 -763
  88. package/dist-lib/worklet-executable.cjs +1 -1
  89. package/dist-lib/worklet-executable.mjs +1 -1
  90. package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -1
  91. package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +9 -1
  92. package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
  93. package/dist-types/packages/peach-engine/src/preview/upload-protocol.d.ts +11 -3
  94. package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +1 -1
  95. package/dist-types/packages/peach-engine/src/webview-automation-host.d.ts +6 -0
  96. package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +2 -0
  97. package/dist-types/packages/peach-globals/src/compositorBridgeContract.d.ts +10 -1
  98. package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
  99. package/package.json +1 -1
  100. package/runtime-companion.json +1 -1
  101. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +69 -2
  102. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +44 -4
  103. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFComposeAssistantViewController.h +29 -0
  104. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeControllerDeferredAction.h +14 -0
  105. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeViewController.h +162 -0
  106. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailDraft.h +24 -0
  107. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController+UPI.h +31 -0
  108. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController.h +169 -0
  109. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MessageUI.h +13 -0
  110. package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Modules/module.modulemap +11 -0
  111. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +10 -0
  112. package/sdk/ios/usr/include/_ctype.h +388 -0
  113. package/sdk/ios/usr/include/_inttypes.h +296 -0
  114. package/sdk/ios/usr/include/_locale.h +83 -0
  115. package/sdk/ios/usr/include/_locale_posix2008.h +65 -0
  116. package/sdk/ios/usr/include/_time.h +207 -0
  117. package/sdk/ios/usr/include/arm/param.h +151 -0
  118. package/sdk/ios/usr/include/ctype.h +70 -0
  119. package/sdk/ios/usr/include/dispatch/dispatch.h +72 -6
  120. package/sdk/ios/usr/include/dlfcn.h +1 -2
  121. package/sdk/ios/usr/include/inttypes.h +35 -0
  122. package/sdk/ios/usr/include/locale.h +59 -0
  123. package/sdk/ios/usr/include/machine/param.h +42 -0
  124. package/sdk/ios/usr/include/net/if.h +1 -2
  125. package/sdk/ios/usr/include/peach/pthread.h +4 -4
  126. package/sdk/ios/usr/include/pthread/qos.h +304 -0
  127. package/sdk/ios/usr/include/runetype.h +118 -0
  128. package/sdk/ios/usr/include/setjmp.h +99 -0
  129. package/sdk/ios/usr/include/sys/_types/_clock_t.h +32 -0
  130. package/sdk/ios/usr/include/sys/_types/_ct_rune_t.h +33 -0
  131. package/sdk/ios/usr/include/sys/_types/_fd_clr.h +31 -0
  132. package/sdk/ios/usr/include/sys/_types/_fd_copy.h +31 -0
  133. package/sdk/ios/usr/include/sys/_types/_fd_def.h +121 -0
  134. package/sdk/ios/usr/include/sys/_types/_fd_isset.h +31 -0
  135. package/sdk/ios/usr/include/sys/_types/_fd_set.h +31 -0
  136. package/sdk/ios/usr/include/sys/_types/_fd_setsize.h +31 -0
  137. package/sdk/ios/usr/include/sys/_types/_fd_zero.h +31 -0
  138. package/sdk/ios/usr/include/sys/_types/_rune_t.h +32 -0
  139. package/sdk/ios/usr/include/sys/_types/_time_t.h +32 -0
  140. package/sdk/ios/usr/include/sys/_types/_wint_t.h +33 -0
  141. package/sdk/ios/usr/include/sys/cdefs.h +5 -0
  142. package/sdk/ios/usr/include/sys/param.h +235 -0
  143. package/sdk/ios/usr/include/sys/proc.h +1 -0
  144. package/sdk/ios/usr/include/sys/qos.h +151 -12
  145. package/sdk/ios/usr/include/time.h +67 -2
  146. package/sdk/ios/wasm/include/__typedef_sigset_t.h +7 -0
  147. package/sdk/ios/wasm/include/fcntl.h +11 -0
  148. package/sdk/ios/wasm/include/mach/machine/boolean.h +2 -0
  149. package/sdk/ios/wasm/include/mach/machine/exception.h +5 -0
  150. package/sdk/ios/wasm/include/mach/machine/kern_return.h +2 -0
  151. package/sdk/ios/wasm/include/mach/machine/processor_info.h +2 -0
  152. package/sdk/ios/wasm/include/mach/machine/rpc.h +2 -0
  153. package/sdk/ios/wasm/include/mach/machine/thread_state.h +3 -0
  154. package/sdk/ios/wasm/include/mach/machine/thread_status.h +3 -0
  155. package/sdk/ios/wasm/include/mach/machine/vm_param.h +3 -0
  156. package/sdk/ios/wasm/include/mach/machine/vm_types.h +18 -0
  157. package/sdk/ios/wasm/include/machine/_types.h +153 -0
  158. package/sdk/ios/wasm/include/machine/endian.h +2 -0
  159. package/sdk/ios/wasm/include/machine/limits.h +2 -0
  160. package/sdk/ios/wasm/include/machine/types.h +30 -0
  161. package/sdk/ios/wasm/include/poll.h +8 -0
  162. package/sdk/ios/wasm/include/pthread.h +50 -0
  163. package/sdk/ios/wasm/include/signal.h +72 -0
  164. package/sdk/ios/wasm/include/stdlib.h +3 -0
  165. package/sdk/ios/wasm/include/string.h +10 -0
  166. package/sdk/ios/wasm/include/sys/_pthread/_pthread_attr_t.h +7 -0
  167. package/sdk/ios/wasm/include/sys/_pthread/_pthread_t.h +7 -0
  168. package/sdk/ios/wasm/include/sys/mman.h +122 -0
  169. package/sdk/ios/wasm/include/sys/select.h +37 -0
  170. package/sdk/ios/wasm/include/sys/signal.h +259 -0
  171. package/sdk/ios/wasm/include/sys/socket.h +8 -0
  172. package/sdk/ios/wasm/include/sys/types.h +14 -0
  173. package/sdk/ios/wasm/include/sys/ucontext.h +1 -0
  174. package/sdk/ios/wasm/include/sys/uio.h +11 -0
  175. package/sdk/ios/wasm/include/sys/wait.h +89 -0
  176. package/sdk/ios/wasm/include/time.h +8 -0
  177. package/sdk/ios/wasm/include/unistd.h +17 -0
  178. package/src/bridge-contract.ts +2 -0
  179. package/src/chromium-admission.ts +10 -5
  180. package/src/device-catalog.ts +4 -4
  181. package/src/host/fetch-proxy-handler.ts +20 -0
  182. package/src/host/rolldown-bundle-forward.ts +4 -1
  183. package/src/metro-plugin.ts +5 -2
  184. package/src/nitro-adapter.lock.json +6 -6
  185. package/src/nitro-compile.ts +63 -2
  186. package/src/numbered-lock.ts +72 -0
  187. package/src/react-native-coverage/capability-reference-resolution.ts +62 -5
  188. package/src/react-native-coverage/capability-source-references.ts +50 -13
  189. package/src/react-native-coverage/native-source-credit.ts +126 -0
  190. package/src/react-native-coverage/native-source-ranges-file.ts +38 -0
  191. package/src/react-native-coverage/native-surface.ts +49 -0
  192. package/src/react-native-coverage/verified-reach.ts +22 -2
  193. package/src/runtime-assets.ts +17 -0
  194. package/src/swift-compile.ts +84 -47
  195. package/src/swift-coverage/indexing.ts +17 -1
  196. package/src/swift-coverage/sdk.ts +71 -0
  197. package/src/swift-coverage/source.ts +74 -2
  198. package/src/swift-coverage/types.ts +6 -0
  199. package/src/swift-distribution.lock.json +12 -12
  200. package/src/swift-host.ts +133 -14
  201. package/src/swift-objc-compile.ts +11 -22
  202. package/src/swift-objc-metadata.ts +2 -8
  203. package/src/swift-objc-platform.ts +53 -0
  204. package/src/swift-objc-standin.ts +49 -0
  205. package/src/swift-package-manifest.ts +48 -3
  206. package/src/swift-package.ts +85 -12
  207. package/src/swift-packages.ts +157 -44
  208. package/src/swift-source-pods.ts +288 -0
  209. package/src/swift-standins.ts +4 -1
  210. package/src/swift-toolchain.ts +32 -10
  211. package/src/vite-plugin-one.ts +5 -4
  212. package/src/worker-system-chunks.ts +7 -1
  213. package/src/xcode-project.ts +40 -11
@@ -2,14 +2,21 @@
2
2
  #include <sys/types.h>
3
3
  #include <stddef.h>
4
4
  #include <stdint.h>
5
+ #include <time.h>
5
6
  #include <stdbool.h>
6
7
  #include <stdarg.h>
7
8
  #include <string.h>
8
9
  #include <unistd.h>
9
10
  #include <fcntl.h>
10
11
  #include <os/object.h>
12
+ #if __has_include(<sys/qos.h>)
13
+ #include <sys/qos.h>
14
+ #endif
11
15
  #if OS_OBJECT_USE_OBJC
12
- @protocol OS_dispatch_queue <NSObject>
16
+ @protocol OS_dispatch_object <NSObject>
17
+ @end
18
+ typedef NSObject<OS_dispatch_object> *dispatch_object_t;
19
+ @protocol OS_dispatch_queue <OS_dispatch_object>
13
20
  @end
14
21
  typedef NSObject<OS_dispatch_queue> *dispatch_queue_t;
15
22
  @protocol OS_dispatch_queue_global <OS_dispatch_queue>
@@ -21,12 +28,18 @@ typedef NSObject<OS_dispatch_queue_serial> *dispatch_queue_serial_t;
21
28
  @protocol OS_dispatch_queue_main <OS_dispatch_queue_serial>
22
29
  @end
23
30
  typedef NSObject<OS_dispatch_queue_main> *dispatch_queue_main_t;
24
- @protocol OS_dispatch_source <NSObject>
31
+ @protocol OS_dispatch_source <OS_dispatch_object>
25
32
  @end
26
33
  typedef NSObject<OS_dispatch_source> *dispatch_source_t;
27
- @protocol OS_dispatch_queue_attr <NSObject>
34
+ @protocol OS_dispatch_queue_attr <OS_dispatch_object>
28
35
  @end
29
36
  typedef NSObject<OS_dispatch_queue_attr> *dispatch_queue_attr_t;
37
+ @protocol OS_dispatch_group <OS_dispatch_object>
38
+ @end
39
+ typedef NSObject<OS_dispatch_group> *dispatch_group_t;
40
+ @protocol OS_dispatch_semaphore <OS_dispatch_object>
41
+ @end
42
+ typedef NSObject<OS_dispatch_semaphore> *dispatch_semaphore_t;
30
43
  #elif defined(__cplusplus)
31
44
  typedef struct dispatch_object_s {
32
45
  private:
@@ -41,6 +54,8 @@ typedef struct dispatch_queue_serial_s : public dispatch_queue_s {} *dispatch_qu
41
54
  typedef struct dispatch_queue_main_s : public dispatch_queue_serial_s {} *dispatch_queue_main_t;
42
55
  typedef struct dispatch_source_s : public dispatch_object_s {} *dispatch_source_t;
43
56
  typedef struct dispatch_queue_attr_s : public dispatch_object_s {} *dispatch_queue_attr_t;
57
+ typedef struct dispatch_group_s : public dispatch_object_s {} *dispatch_group_t;
58
+ typedef struct dispatch_semaphore_s : public dispatch_object_s {} *dispatch_semaphore_t;
44
59
  #else
45
60
  typedef struct dispatch_queue_s *dispatch_queue_t;
46
61
  typedef dispatch_queue_t dispatch_queue_global_t;
@@ -48,6 +63,22 @@ typedef dispatch_queue_t dispatch_queue_serial_t;
48
63
  typedef dispatch_queue_t dispatch_queue_main_t;
49
64
  typedef struct dispatch_source_s *dispatch_source_t;
50
65
  typedef struct dispatch_queue_attr_s *dispatch_queue_attr_t;
66
+ typedef struct dispatch_group_s *dispatch_group_t;
67
+ typedef struct dispatch_semaphore_s *dispatch_semaphore_t;
68
+ typedef union {
69
+ struct _os_object_s *_os_obj;
70
+ struct dispatch_object_s *_do;
71
+ struct dispatch_queue_s *_dq;
72
+ struct dispatch_queue_attr_s *_dqa;
73
+ struct dispatch_group_s *_dg;
74
+ struct dispatch_source_s *_ds;
75
+ struct dispatch_channel_s *_dch;
76
+ struct dispatch_mach_s *_dm;
77
+ struct dispatch_mach_msg_s *_dmsg;
78
+ struct dispatch_semaphore_s *_dsema;
79
+ struct dispatch_data_s *_ddata;
80
+ struct dispatch_io_s *_dchannel;
81
+ } dispatch_object_t __attribute__((__transparent_union__));
51
82
  #endif
52
83
  #define DISPATCH_QUEUE_PRIORITY_HIGH 2
53
84
  #define DISPATCH_QUEUE_PRIORITY_DEFAULT 0
@@ -62,14 +93,29 @@ typedef uint64_t dispatch_time_t;
62
93
  #define DISPATCH_TIME_NOW (0ull)
63
94
  #define DISPATCH_TIME_FOREVER (~0ull)
64
95
  #define DISPATCH_QUEUE_SERIAL NULL
96
+ #ifdef __cplusplus
97
+ extern "C" {
98
+ #endif
99
+ extern const struct dispatch_queue_attr_s _dispatch_queue_attr_concurrent;
100
+ #define DISPATCH_QUEUE_CONCURRENT DISPATCH_GLOBAL_OBJECT(dispatch_queue_attr_t, _dispatch_queue_attr_concurrent)
101
+ #define DISPATCH_CURRENT_QUEUE_LABEL NULL
102
+ enum { DISPATCH_WALLTIME_NOW __attribute__((availability(ios,introduced=12.0))) = ~1ull };
103
+ typedef const struct dispatch_source_type_s *dispatch_source_type_t;
104
+ extern const struct dispatch_source_type_s _dispatch_source_type_timer;
105
+ extern const struct dispatch_source_type_s _dispatch_source_type_memorypressure;
106
+ #define DISPATCH_SOURCE_TYPE_TIMER (&_dispatch_source_type_timer)
107
+ #define DISPATCH_SOURCE_TYPE_MEMORYPRESSURE (&_dispatch_source_type_memorypressure)
108
+ #define DISPATCH_TIMER_STRICT 0x1
109
+ typedef unsigned long dispatch_source_timer_flags_t;
110
+ #define DISPATCH_MEMORYPRESSURE_NORMAL 0x01
111
+ #define DISPATCH_MEMORYPRESSURE_WARN 0x02
112
+ #define DISPATCH_MEMORYPRESSURE_CRITICAL 0x04
113
+ typedef unsigned long dispatch_source_memorypressure_flags_t;
65
114
  typedef void (*dispatch_function_t)(void *_Nullable);
66
115
  #ifdef __BLOCKS__
67
116
  typedef void (^dispatch_block_t)(void);
68
117
  #endif
69
118
  typedef intptr_t dispatch_once_t __attribute__((availability(swift, unavailable, message="Use lazily initialized globals instead")));
70
- #ifdef __cplusplus
71
- extern "C" {
72
- #endif
73
119
  dispatch_queue_global_t _Nonnull dispatch_get_global_queue(intptr_t identifier, uintptr_t flags) __attribute__((const, warn_unused_result, nothrow, swift_private, availability(ios, introduced=4.0)));
74
120
  #ifdef __BLOCKS__
75
121
  void dispatch_async(dispatch_queue_t _Nonnull queue, dispatch_block_t _Nonnull block) __attribute__((nonnull, nothrow, swift_private, availability(ios, introduced=4.0)));
@@ -83,6 +129,23 @@ extern __attribute__((visibility("default"), availability(ios,introduced=4.0)))
83
129
  #endif
84
130
  static inline __attribute__((always_inline, const, nothrow, availability(swift, unavailable, message="Use getter:DispatchQueue.main()"))) dispatch_queue_main_t _Nonnull dispatch_get_main_queue(void) { return DISPATCH_GLOBAL_OBJECT(dispatch_queue_main_t, _dispatch_main_q); }
85
131
  dispatch_time_t dispatch_time(dispatch_time_t when, int64_t delta) __attribute__((warn_unused_result, nothrow, swift_private, availability(ios,introduced=4.0)));
132
+ dispatch_time_t dispatch_walltime(const struct timespec * _Nullable when, int64_t delta) __attribute__((warn_unused_result, nothrow));
133
+ void dispatch_retain(dispatch_object_t object) __attribute__((nonnull(1), nothrow));
134
+ void dispatch_release(dispatch_object_t object) __attribute__((nonnull(1), nothrow));
135
+ void dispatch_activate(dispatch_object_t object) __attribute__((nonnull(1), nothrow));
136
+ void dispatch_resume(dispatch_object_t object) __attribute__((nonnull(1), nothrow));
137
+ void dispatch_suspend(dispatch_object_t object) __attribute__((nonnull(1), nothrow));
138
+ dispatch_source_t _Nullable dispatch_source_create(dispatch_source_type_t _Nonnull type, uintptr_t handle, unsigned long mask, dispatch_queue_t _Nullable queue) __attribute__((ns_returns_retained, warn_unused_result, nothrow));
139
+ void dispatch_source_cancel(dispatch_source_t _Nonnull source) __attribute__((nothrow));
140
+ uintptr_t dispatch_source_get_data(dispatch_source_t _Nonnull source) __attribute__((warn_unused_result, nothrow));
141
+ void dispatch_source_set_timer(dispatch_source_t _Nonnull source, dispatch_time_t start, uint64_t interval, uint64_t leeway) __attribute__((nothrow));
142
+ dispatch_group_t _Nonnull dispatch_group_create(void) __attribute__((ns_returns_retained, warn_unused_result, nothrow));
143
+ void dispatch_group_enter(dispatch_group_t _Nonnull group) __attribute__((nothrow));
144
+ void dispatch_group_leave(dispatch_group_t _Nonnull group) __attribute__((nothrow));
145
+ intptr_t dispatch_group_wait(dispatch_group_t _Nonnull group, dispatch_time_t timeout) __attribute__((nothrow));
146
+ dispatch_semaphore_t _Nullable dispatch_semaphore_create(intptr_t value) __attribute__((ns_returns_retained, warn_unused_result, nothrow));
147
+ intptr_t dispatch_semaphore_wait(dispatch_semaphore_t _Nonnull semaphore, dispatch_time_t timeout) __attribute__((nothrow));
148
+ intptr_t dispatch_semaphore_signal(dispatch_semaphore_t _Nonnull semaphore) __attribute__((nothrow));
86
149
  dispatch_queue_t _Nonnull dispatch_queue_create(const char * _Nullable label, dispatch_queue_attr_t _Nullable attr) __attribute__((malloc, ns_returns_retained, warn_unused_result, nothrow, swift_private, availability(ios,introduced=4.0)));
87
150
  #ifndef DISPATCH_ALIAS_V2
88
151
  #if TARGET_OS_MAC
@@ -97,6 +160,9 @@ void dispatch_queue_set_specific(dispatch_queue_t _Nonnull queue, const void * _
97
160
  #ifdef __BLOCKS__
98
161
  void dispatch_after(dispatch_time_t when, dispatch_queue_t _Nonnull queue, dispatch_block_t _Nonnull block) __attribute__((nonnull(2, 3), nothrow, swift_private, availability(ios,introduced=4.0)));
99
162
  void dispatch_sync(dispatch_queue_t _Nonnull queue, __attribute__((noescape)) dispatch_block_t _Nonnull block) __attribute__((nonnull, nothrow, availability(ios,introduced=4.0)));
163
+ void dispatch_source_set_event_handler(dispatch_source_t _Nonnull source, dispatch_block_t _Nullable handler) __attribute__((nothrow));
164
+ void dispatch_group_async(dispatch_group_t _Nonnull group, dispatch_queue_t _Nonnull queue, dispatch_block_t _Nonnull block) __attribute__((nothrow));
165
+ void dispatch_group_notify(dispatch_group_t _Nonnull group, dispatch_queue_t _Nonnull queue, dispatch_block_t _Nonnull block) __attribute__((nothrow));
100
166
  #endif
101
167
  typedef enum : unsigned long {
102
168
  DISPATCH_AUTORELEASE_FREQUENCY_INHERIT __attribute__((availability(macos,introduced=10.12), availability(ios,introduced=10.0), availability(tvos,introduced=10.0), availability(watchos,introduced=3.0))) = 0,
@@ -1,5 +1,4 @@
1
1
  #pragma once
2
- #include <peach/darwin.h>
3
2
  typedef struct dl_info {
4
3
  const char *dli_fname;
5
4
  void *dli_fbase;
@@ -10,7 +9,7 @@ typedef struct dl_info Dl_info_t;
10
9
  #ifdef __cplusplus
11
10
  extern "C" {
12
11
  #endif
13
- int dladdr(const void *, Dl_info *) __PEACH_DARWIN_UNAVAILABLE("Darwin image lookup is not implemented for WebAssembly");
12
+ int dladdr(const void *, Dl_info *);
14
13
  #ifdef __cplusplus
15
14
  }
16
15
  #endif
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Copyright (c) 2000-2004, 2013, 2023 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
+ * <inttypes.h> -- Standard C header, defined in ISO/IEC 9899:1999
26
+ * (aka "C99"), section 7.8. This defines format string conversion
27
+ * specifiers suitable for use within arguments to fprintf and fscanf
28
+ * and their ilk.
29
+ */
30
+
31
+ #include <_inttypes.h>
32
+
33
+ #ifdef _USE_EXTENDED_LOCALES_
34
+ #include <xlocale/_inttypes.h>
35
+ #endif /* _USE_EXTENDED_LOCALES_ */
@@ -0,0 +1,59 @@
1
+ /*
2
+ * Copyright (c) 1991, 1993
3
+ * The Regents of the University of California. All rights reserved.
4
+ *
5
+ * Redistribution and use in source and binary forms, with or without
6
+ * modification, are permitted provided that the following conditions
7
+ * are met:
8
+ * 1. Redistributions of source code must retain the above copyright
9
+ * notice, this list of conditions and the following disclaimer.
10
+ * 2. Redistributions in binary form must reproduce the above copyright
11
+ * notice, this list of conditions and the following disclaimer in the
12
+ * documentation and/or other materials provided with the distribution.
13
+ * 3. All advertising materials mentioning features or use of this software
14
+ * must display the following acknowledgement:
15
+ * This product includes software developed by the University of
16
+ * California, Berkeley and its contributors.
17
+ * 4. Neither the name of the University nor the names of its contributors
18
+ * may be used to endorse or promote products derived from this software
19
+ * without specific prior written permission.
20
+ *
21
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31
+ * SUCH DAMAGE.
32
+ *
33
+ * @(#)locale.h 8.1 (Berkeley) 6/2/93
34
+ * $FreeBSD: /repoman/r/ncvs/src/include/locale.h,v 1.7 2002/10/09 09:19:27 tjr Exp $
35
+ */
36
+
37
+ #ifndef _LOCALE_H_
38
+ #define _LOCALE_H_
39
+
40
+ #include <_bounds.h>
41
+ #include <_locale.h>
42
+
43
+ _LIBC_SINGLE_BY_DEFAULT()
44
+
45
+ #define LC_ALL 0
46
+ #define LC_COLLATE 1
47
+ #define LC_CTYPE 2
48
+ #define LC_MONETARY 3
49
+ #define LC_NUMERIC 4
50
+ #define LC_TIME 5
51
+ #define LC_MESSAGES 6
52
+
53
+ #define _LC_LAST 7 /* marks end */
54
+
55
+ __BEGIN_DECLS
56
+ char *_LIBC_CSTR setlocale(int, const char *);
57
+ __END_DECLS
58
+
59
+ #endif /* _LOCALE_H_ */
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Copyright (c) 2000-2007 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
+ /*
29
+ * Copyright 1995 NeXT Computer, Inc. All rights reserved.
30
+ */
31
+ #ifndef _BSD_MACHINE_PARAM_H_
32
+ #define _BSD_MACHINE_PARAM_H_
33
+
34
+ #if defined (__i386__) || defined(__x86_64__)
35
+ #include <i386/param.h>
36
+ #elif defined (__arm__) || defined (__arm64__)
37
+ #include <arm/param.h>
38
+ #else
39
+ #error architecture not supported
40
+ #endif
41
+
42
+ #endif /* _BSD_MACHINE_PARAM_H_ */
@@ -1,7 +1,6 @@
1
1
  #pragma once
2
2
  #include <net/if_var.h>
3
3
  #include <sys/socket.h>
4
- #include <peach/darwin.h>
5
4
  #define IF_NAMESIZE 16
6
5
  #define IFNAMSIZ IF_NAMESIZE
7
6
  struct if_msghdr {
@@ -14,7 +13,7 @@ struct if_msghdr {
14
13
  #ifdef __cplusplus
15
14
  extern "C" {
16
15
  #endif
17
- unsigned int if_nametoindex(const char *) __PEACH_DARWIN_UNAVAILABLE("Darwin network interfaces are not implemented for WebAssembly");
16
+ unsigned int if_nametoindex(const char *);
18
17
  #ifdef __cplusplus
19
18
  }
20
19
  #endif
@@ -1,7 +1,6 @@
1
1
  #pragma once
2
2
  #include <stddef.h>
3
3
  #include <mach/mach_types.h>
4
- #include <peach/darwin.h>
5
4
  #if defined(__wasm__) && defined(__cplusplus)
6
5
  #define __PEACH_PTHREAD_NULLABLE
7
6
  #else
@@ -10,9 +9,10 @@
10
9
  #ifdef __cplusplus
11
10
  extern "C" {
12
11
  #endif
13
- mach_port_t pthread_mach_thread_np(pthread_t) __attribute__((availability(ios,introduced=2.0))) __PEACH_DARWIN_UNAVAILABLE("Darwin pthread Mach ports are not implemented for WebAssembly");
14
- pthread_t __PEACH_PTHREAD_NULLABLE pthread_from_mach_thread_np(mach_port_t) __attribute__((availability(ios,introduced=2.0))) __PEACH_DARWIN_UNAVAILABLE("Darwin pthread Mach ports are not implemented for WebAssembly");
15
- int pthread_getname_np(pthread_t, char *, size_t) __attribute__((availability(ios,introduced=3.2))) __PEACH_DARWIN_UNAVAILABLE("Darwin pthread names are not implemented for WebAssembly");
12
+ mach_port_t pthread_mach_thread_np(pthread_t) __attribute__((availability(ios,introduced=2.0)));
13
+ pthread_t __PEACH_PTHREAD_NULLABLE pthread_from_mach_thread_np(mach_port_t) __attribute__((availability(ios,introduced=2.0)));
14
+ int pthread_getname_np(pthread_t, char *, size_t) __attribute__((availability(ios,introduced=3.2)));
15
+ int pthread_setname_np(const char *) __attribute__((availability(ios,introduced=3.2)));
16
16
  #ifdef __cplusplus
17
17
  }
18
18
  #endif
@@ -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