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.
- package/cli/commands/control.ts +13 -1
- package/cli/commands/coverage-swift.ts +83 -27
- package/cli/commands/coverage.ts +219 -20
- package/cli/commands/detect.ts +10 -6
- package/cli/commands/inspect/core.ts +2 -0
- package/cli/commands/inspect/settling.ts +37 -4
- package/cli/commands/inspect/wait-ready.ts +7 -0
- package/cli/outbound-endpoints.ts +12 -0
- package/detox/index.ts +11 -1
- package/detox/jest-environment.cjs +14 -0
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +3299 -1665
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +43 -8
- package/dist-lib/detox/jest-environment.cjs +14 -0
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +2432 -1128
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +2908 -1601
- package/dist-lib/host/fetch-proxy-handler.cjs +22 -6
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1941 -742
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +6215 -4283
- package/dist-lib/native-app-identity-project.cjs +31 -6
- package/dist-lib/native-app-identity-project.mjs +31 -6
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -23
- package/dist-lib/public-origins-lib-static.json +1 -1
- package/dist-lib/public-origins-lib.json +134 -78
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +2 -2
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +39 -5
- package/dist-lib/sdk.mjs +39 -5
- package/dist-lib/skills.cjs +3637 -2168
- package/dist-lib/swift-compile.cjs +496 -352
- package/dist-lib/swift-compile.mjs +494 -350
- package/dist-lib/swift-package.cjs +58 -9
- package/dist-lib/swift-package.mjs +57 -9
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +26 -11
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +2443 -1134
- package/dist-lib/vite.cjs +1907 -763
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +9 -1
- package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/preview/upload-protocol.d.ts +11 -3
- package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/webview-automation-host.d.ts +6 -0
- package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +2 -0
- package/dist-types/packages/peach-globals/src/compositorBridgeContract.d.ts +10 -1
- package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +69 -2
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +44 -4
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFComposeAssistantViewController.h +29 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeControllerDeferredAction.h +14 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeViewController.h +162 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailDraft.h +24 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController+UPI.h +31 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController.h +169 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MessageUI.h +13 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Modules/module.modulemap +11 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +10 -0
- package/sdk/ios/usr/include/_ctype.h +388 -0
- package/sdk/ios/usr/include/_inttypes.h +296 -0
- package/sdk/ios/usr/include/_locale.h +83 -0
- package/sdk/ios/usr/include/_locale_posix2008.h +65 -0
- package/sdk/ios/usr/include/_time.h +207 -0
- package/sdk/ios/usr/include/arm/param.h +151 -0
- package/sdk/ios/usr/include/ctype.h +70 -0
- package/sdk/ios/usr/include/dispatch/dispatch.h +72 -6
- package/sdk/ios/usr/include/dlfcn.h +1 -2
- package/sdk/ios/usr/include/inttypes.h +35 -0
- package/sdk/ios/usr/include/locale.h +59 -0
- package/sdk/ios/usr/include/machine/param.h +42 -0
- package/sdk/ios/usr/include/net/if.h +1 -2
- package/sdk/ios/usr/include/peach/pthread.h +4 -4
- package/sdk/ios/usr/include/pthread/qos.h +304 -0
- package/sdk/ios/usr/include/runetype.h +118 -0
- package/sdk/ios/usr/include/setjmp.h +99 -0
- package/sdk/ios/usr/include/sys/_types/_clock_t.h +32 -0
- package/sdk/ios/usr/include/sys/_types/_ct_rune_t.h +33 -0
- package/sdk/ios/usr/include/sys/_types/_fd_clr.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_copy.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_def.h +121 -0
- package/sdk/ios/usr/include/sys/_types/_fd_isset.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_set.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_setsize.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_zero.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_rune_t.h +32 -0
- package/sdk/ios/usr/include/sys/_types/_time_t.h +32 -0
- package/sdk/ios/usr/include/sys/_types/_wint_t.h +33 -0
- package/sdk/ios/usr/include/sys/cdefs.h +5 -0
- package/sdk/ios/usr/include/sys/param.h +235 -0
- package/sdk/ios/usr/include/sys/proc.h +1 -0
- package/sdk/ios/usr/include/sys/qos.h +151 -12
- package/sdk/ios/usr/include/time.h +67 -2
- package/sdk/ios/wasm/include/__typedef_sigset_t.h +7 -0
- package/sdk/ios/wasm/include/fcntl.h +11 -0
- package/sdk/ios/wasm/include/mach/machine/boolean.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/exception.h +5 -0
- package/sdk/ios/wasm/include/mach/machine/kern_return.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/processor_info.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/rpc.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/thread_state.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/thread_status.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/vm_param.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/vm_types.h +18 -0
- package/sdk/ios/wasm/include/machine/_types.h +153 -0
- package/sdk/ios/wasm/include/machine/endian.h +2 -0
- package/sdk/ios/wasm/include/machine/limits.h +2 -0
- package/sdk/ios/wasm/include/machine/types.h +30 -0
- package/sdk/ios/wasm/include/poll.h +8 -0
- package/sdk/ios/wasm/include/pthread.h +50 -0
- package/sdk/ios/wasm/include/signal.h +72 -0
- package/sdk/ios/wasm/include/stdlib.h +3 -0
- package/sdk/ios/wasm/include/string.h +10 -0
- package/sdk/ios/wasm/include/sys/_pthread/_pthread_attr_t.h +7 -0
- package/sdk/ios/wasm/include/sys/_pthread/_pthread_t.h +7 -0
- package/sdk/ios/wasm/include/sys/mman.h +122 -0
- package/sdk/ios/wasm/include/sys/select.h +37 -0
- package/sdk/ios/wasm/include/sys/signal.h +259 -0
- package/sdk/ios/wasm/include/sys/socket.h +8 -0
- package/sdk/ios/wasm/include/sys/types.h +14 -0
- package/sdk/ios/wasm/include/sys/ucontext.h +1 -0
- package/sdk/ios/wasm/include/sys/uio.h +11 -0
- package/sdk/ios/wasm/include/sys/wait.h +89 -0
- package/sdk/ios/wasm/include/time.h +8 -0
- package/sdk/ios/wasm/include/unistd.h +17 -0
- package/src/bridge-contract.ts +2 -0
- package/src/chromium-admission.ts +10 -5
- package/src/device-catalog.ts +4 -4
- package/src/host/fetch-proxy-handler.ts +20 -0
- package/src/host/rolldown-bundle-forward.ts +4 -1
- package/src/metro-plugin.ts +5 -2
- package/src/nitro-adapter.lock.json +6 -6
- package/src/nitro-compile.ts +63 -2
- package/src/numbered-lock.ts +72 -0
- package/src/react-native-coverage/capability-reference-resolution.ts +62 -5
- package/src/react-native-coverage/capability-source-references.ts +50 -13
- package/src/react-native-coverage/native-source-credit.ts +126 -0
- package/src/react-native-coverage/native-source-ranges-file.ts +38 -0
- package/src/react-native-coverage/native-surface.ts +49 -0
- package/src/react-native-coverage/verified-reach.ts +22 -2
- package/src/runtime-assets.ts +17 -0
- package/src/swift-compile.ts +84 -47
- package/src/swift-coverage/indexing.ts +17 -1
- package/src/swift-coverage/sdk.ts +71 -0
- package/src/swift-coverage/source.ts +74 -2
- package/src/swift-coverage/types.ts +6 -0
- package/src/swift-distribution.lock.json +12 -12
- package/src/swift-host.ts +133 -14
- package/src/swift-objc-compile.ts +11 -22
- package/src/swift-objc-metadata.ts +2 -8
- package/src/swift-objc-platform.ts +53 -0
- package/src/swift-objc-standin.ts +49 -0
- package/src/swift-package-manifest.ts +48 -3
- package/src/swift-package.ts +85 -12
- package/src/swift-packages.ts +157 -44
- package/src/swift-source-pods.ts +288 -0
- package/src/swift-standins.ts +4 -1
- package/src/swift-toolchain.ts +32 -10
- package/src/vite-plugin-one.ts +5 -4
- package/src/worker-system-chunks.ts +7 -1
- package/src/xcode-project.ts +40 -11
|
@@ -0,0 +1,83 @@
|
|
|
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 <sys/cdefs.h>
|
|
41
|
+
#include <_bounds.h>
|
|
42
|
+
#include <_types.h>
|
|
43
|
+
|
|
44
|
+
#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE >= 200809L
|
|
45
|
+
#include <_locale_posix2008.h>
|
|
46
|
+
#endif
|
|
47
|
+
|
|
48
|
+
_LIBC_SINGLE_BY_DEFAULT()
|
|
49
|
+
|
|
50
|
+
struct lconv {
|
|
51
|
+
char *_LIBC_CSTR decimal_point;
|
|
52
|
+
char *_LIBC_CSTR thousands_sep;
|
|
53
|
+
char *_LIBC_CSTR grouping;
|
|
54
|
+
char *_LIBC_CSTR int_curr_symbol;
|
|
55
|
+
char *_LIBC_CSTR currency_symbol;
|
|
56
|
+
char *_LIBC_CSTR mon_decimal_point;
|
|
57
|
+
char *_LIBC_CSTR mon_thousands_sep;
|
|
58
|
+
char *_LIBC_CSTR mon_grouping;
|
|
59
|
+
char *_LIBC_CSTR positive_sign;
|
|
60
|
+
char *_LIBC_CSTR negative_sign;
|
|
61
|
+
char int_frac_digits;
|
|
62
|
+
char frac_digits;
|
|
63
|
+
char p_cs_precedes;
|
|
64
|
+
char p_sep_by_space;
|
|
65
|
+
char n_cs_precedes;
|
|
66
|
+
char n_sep_by_space;
|
|
67
|
+
char p_sign_posn;
|
|
68
|
+
char n_sign_posn;
|
|
69
|
+
char int_p_cs_precedes;
|
|
70
|
+
char int_n_cs_precedes;
|
|
71
|
+
char int_p_sep_by_space;
|
|
72
|
+
char int_n_sep_by_space;
|
|
73
|
+
char int_p_sign_posn;
|
|
74
|
+
char int_n_sign_posn;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
#include <sys/_types/_null.h>
|
|
78
|
+
|
|
79
|
+
__BEGIN_DECLS
|
|
80
|
+
struct lconv *localeconv(void);
|
|
81
|
+
__END_DECLS
|
|
82
|
+
|
|
83
|
+
#endif /* __LOCALE_H_ */
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2005 - 2025 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 __LOCALE_POSIX2008_H_
|
|
25
|
+
#define __LOCALE_POSIX2008_H_
|
|
26
|
+
|
|
27
|
+
#include <sys/cdefs.h>
|
|
28
|
+
#include <_types.h>
|
|
29
|
+
|
|
30
|
+
_LIBC_SINGLE_BY_DEFAULT()
|
|
31
|
+
|
|
32
|
+
/*
|
|
33
|
+
* These definitions were all historically provided by <xlocale.h>, but they
|
|
34
|
+
* became standardized in POSIX.1-2008. We make them available via either
|
|
35
|
+
* <xlocale.h> or <locale.h> at the appropriate conformance level.
|
|
36
|
+
*/
|
|
37
|
+
#define LC_ALL_MASK ( LC_COLLATE_MASK \
|
|
38
|
+
| LC_CTYPE_MASK \
|
|
39
|
+
| LC_MESSAGES_MASK \
|
|
40
|
+
| LC_MONETARY_MASK \
|
|
41
|
+
| LC_NUMERIC_MASK \
|
|
42
|
+
| LC_TIME_MASK )
|
|
43
|
+
#define LC_COLLATE_MASK (1 << 0)
|
|
44
|
+
#define LC_CTYPE_MASK (1 << 1)
|
|
45
|
+
#define LC_MESSAGES_MASK (1 << 2)
|
|
46
|
+
#define LC_MONETARY_MASK (1 << 3)
|
|
47
|
+
#define LC_NUMERIC_MASK (1 << 4)
|
|
48
|
+
#define LC_TIME_MASK (1 << 5)
|
|
49
|
+
|
|
50
|
+
#define _LC_NUM_MASK 6
|
|
51
|
+
#define _LC_LAST_MASK (1 << (_LC_NUM_MASK - 1))
|
|
52
|
+
|
|
53
|
+
#define LC_GLOBAL_LOCALE ((locale_t)-1)
|
|
54
|
+
#define LC_C_LOCALE ((locale_t)NULL)
|
|
55
|
+
|
|
56
|
+
#include <_types/_locale_t.h>
|
|
57
|
+
|
|
58
|
+
__BEGIN_DECLS
|
|
59
|
+
locale_t duplocale(locale_t);
|
|
60
|
+
int freelocale(locale_t);
|
|
61
|
+
locale_t newlocale(int, __const char *, locale_t);
|
|
62
|
+
locale_t uselocale(locale_t);
|
|
63
|
+
__END_DECLS
|
|
64
|
+
|
|
65
|
+
#endif /* __LOCALE_POSIX2008_H_ */
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023 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
|
+
* Copyright (c) 1989, 1993
|
|
25
|
+
* The Regents of the University of California. All rights reserved.
|
|
26
|
+
* (c) UNIX System Laboratories, Inc.
|
|
27
|
+
* All or some portions of this file are derived from material licensed
|
|
28
|
+
* to the University of California by American Telephone and Telegraph
|
|
29
|
+
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
|
30
|
+
* the permission of UNIX System Laboratories, Inc.
|
|
31
|
+
*
|
|
32
|
+
* Redistribution and use in source and binary forms, with or without
|
|
33
|
+
* modification, are permitted provided that the following conditions
|
|
34
|
+
* are met:
|
|
35
|
+
* 1. Redistributions of source code must retain the above copyright
|
|
36
|
+
* notice, this list of conditions and the following disclaimer.
|
|
37
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
|
38
|
+
* notice, this list of conditions and the following disclaimer in the
|
|
39
|
+
* documentation and/or other materials provided with the distribution.
|
|
40
|
+
* 3. All advertising materials mentioning features or use of this software
|
|
41
|
+
* must display the following acknowledgement:
|
|
42
|
+
* This product includes software developed by the University of
|
|
43
|
+
* California, Berkeley and its contributors.
|
|
44
|
+
* 4. Neither the name of the University nor the names of its contributors
|
|
45
|
+
* may be used to endorse or promote products derived from this software
|
|
46
|
+
* without specific prior written permission.
|
|
47
|
+
*
|
|
48
|
+
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
49
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
50
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
51
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
52
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
53
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
54
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
55
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
56
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
57
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
58
|
+
* SUCH DAMAGE.
|
|
59
|
+
*
|
|
60
|
+
* @(#)time.h 8.3 (Berkeley) 1/21/94
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
#ifndef _TIME_H_
|
|
64
|
+
#define _TIME_H_
|
|
65
|
+
|
|
66
|
+
#include <_types.h>
|
|
67
|
+
#include <sys/cdefs.h>
|
|
68
|
+
#include <_bounds.h>
|
|
69
|
+
#include <Availability.h>
|
|
70
|
+
#include <sys/_types/_clock_t.h>
|
|
71
|
+
#include <sys/_types/_null.h>
|
|
72
|
+
#include <sys/_types/_size_t.h>
|
|
73
|
+
#include <sys/_types/_time_t.h>
|
|
74
|
+
#include <sys/_types/_timespec.h>
|
|
75
|
+
|
|
76
|
+
_LIBC_SINGLE_BY_DEFAULT()
|
|
77
|
+
|
|
78
|
+
struct tm {
|
|
79
|
+
int tm_sec; /* seconds after the minute [0-60] */
|
|
80
|
+
int tm_min; /* minutes after the hour [0-59] */
|
|
81
|
+
int tm_hour; /* hours since midnight [0-23] */
|
|
82
|
+
int tm_mday; /* day of the month [1-31] */
|
|
83
|
+
int tm_mon; /* months since January [0-11] */
|
|
84
|
+
int tm_year; /* years since 1900 */
|
|
85
|
+
int tm_wday; /* days since Sunday [0-6] */
|
|
86
|
+
int tm_yday; /* days since January 1 [0-365] */
|
|
87
|
+
int tm_isdst; /* Daylight Savings Time flag */
|
|
88
|
+
long tm_gmtoff; /* offset from UTC in seconds */
|
|
89
|
+
char *_LIBC_CSTR tm_zone; /* timezone abbreviation */
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
#if __DARWIN_UNIX03
|
|
93
|
+
#define CLOCKS_PER_SEC ((clock_t)1000000) /* [XSI] */
|
|
94
|
+
#else /* !__DARWIN_UNIX03 */
|
|
95
|
+
#include <machine/_limits.h> /* Include file containing CLK_TCK. */
|
|
96
|
+
|
|
97
|
+
#define CLOCKS_PER_SEC ((clock_t)(__DARWIN_CLK_TCK))
|
|
98
|
+
#endif /* __DARWIN_UNIX03 */
|
|
99
|
+
|
|
100
|
+
#ifndef _ANSI_SOURCE
|
|
101
|
+
extern char *_LIBC_CSTR tzname[_LIBC_COUNT(2)];
|
|
102
|
+
#endif
|
|
103
|
+
|
|
104
|
+
extern int getdate_err;
|
|
105
|
+
#if __DARWIN_UNIX03
|
|
106
|
+
extern long timezone __DARWIN_ALIAS(timezone);
|
|
107
|
+
#endif /* __DARWIN_UNIX03 */
|
|
108
|
+
extern int daylight;
|
|
109
|
+
|
|
110
|
+
__BEGIN_DECLS
|
|
111
|
+
char *_LIBC_CSTR asctime(const struct tm *);
|
|
112
|
+
clock_t clock(void) __DARWIN_ALIAS(clock);
|
|
113
|
+
char *_LIBC_CSTR ctime(const time_t *);
|
|
114
|
+
double difftime(time_t, time_t);
|
|
115
|
+
struct tm *getdate(const char *);
|
|
116
|
+
struct tm *gmtime(const time_t *);
|
|
117
|
+
struct tm *localtime(const time_t *);
|
|
118
|
+
time_t mktime(struct tm *) __DARWIN_ALIAS(mktime);
|
|
119
|
+
size_t strftime(char *_LIBC_COUNT(__maxsize) __restrict, size_t __maxsize, const char * __restrict, const struct tm * __restrict) __DARWIN_ALIAS(strftime);
|
|
120
|
+
char *_LIBC_CSTR strptime(const char * __restrict, const char * __restrict, struct tm * __restrict) __DARWIN_ALIAS(strptime);
|
|
121
|
+
time_t time(time_t *);
|
|
122
|
+
|
|
123
|
+
#ifndef _ANSI_SOURCE
|
|
124
|
+
void tzset(void);
|
|
125
|
+
#endif /* not ANSI */
|
|
126
|
+
|
|
127
|
+
/* [TSF] Thread safe functions */
|
|
128
|
+
char *_LIBC_CSTR asctime_r(const struct tm * __restrict, char * __restrict _LIBC_COUNT(26));
|
|
129
|
+
char *_LIBC_CSTR ctime_r(const time_t *, char *_LIBC_COUNT(26));
|
|
130
|
+
struct tm *gmtime_r(const time_t * __restrict, struct tm * __restrict);
|
|
131
|
+
struct tm *localtime_r(const time_t * __restrict, struct tm * __restrict);
|
|
132
|
+
|
|
133
|
+
#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
|
|
134
|
+
time_t posix2time(time_t);
|
|
135
|
+
#if !__DARWIN_UNIX03
|
|
136
|
+
char *_LIBC_CSTR timezone(int, int);
|
|
137
|
+
#endif /* !__DARWIN_UNIX03 */
|
|
138
|
+
void tzsetwall(void);
|
|
139
|
+
time_t time2posix(time_t);
|
|
140
|
+
time_t timelocal(struct tm * const);
|
|
141
|
+
time_t timegm(struct tm * const);
|
|
142
|
+
#endif /* neither ANSI nor POSIX */
|
|
143
|
+
|
|
144
|
+
#if !defined(_ANSI_SOURCE)
|
|
145
|
+
int nanosleep(const struct timespec *__rqtp, struct timespec *__rmtp) __DARWIN_ALIAS_C(nanosleep);
|
|
146
|
+
#endif
|
|
147
|
+
|
|
148
|
+
#if !defined(_DARWIN_FEATURE_CLOCK_GETTIME) || _DARWIN_FEATURE_CLOCK_GETTIME != 0
|
|
149
|
+
#if __DARWIN_C_LEVEL >= 199309L
|
|
150
|
+
#if __has_feature(enumerator_attributes)
|
|
151
|
+
#define __CLOCK_AVAILABILITY __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
|
|
152
|
+
#else
|
|
153
|
+
#define __CLOCK_AVAILABILITY
|
|
154
|
+
#endif
|
|
155
|
+
|
|
156
|
+
typedef enum {
|
|
157
|
+
_CLOCK_REALTIME __CLOCK_AVAILABILITY = 0,
|
|
158
|
+
#define CLOCK_REALTIME _CLOCK_REALTIME
|
|
159
|
+
_CLOCK_MONOTONIC __CLOCK_AVAILABILITY = 6,
|
|
160
|
+
#define CLOCK_MONOTONIC _CLOCK_MONOTONIC
|
|
161
|
+
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
|
162
|
+
_CLOCK_MONOTONIC_RAW __CLOCK_AVAILABILITY = 4,
|
|
163
|
+
#define CLOCK_MONOTONIC_RAW _CLOCK_MONOTONIC_RAW
|
|
164
|
+
_CLOCK_MONOTONIC_RAW_APPROX __CLOCK_AVAILABILITY = 5,
|
|
165
|
+
#define CLOCK_MONOTONIC_RAW_APPROX _CLOCK_MONOTONIC_RAW_APPROX
|
|
166
|
+
_CLOCK_UPTIME_RAW __CLOCK_AVAILABILITY = 8,
|
|
167
|
+
#define CLOCK_UPTIME_RAW _CLOCK_UPTIME_RAW
|
|
168
|
+
_CLOCK_UPTIME_RAW_APPROX __CLOCK_AVAILABILITY = 9,
|
|
169
|
+
#define CLOCK_UPTIME_RAW_APPROX _CLOCK_UPTIME_RAW_APPROX
|
|
170
|
+
#endif
|
|
171
|
+
_CLOCK_PROCESS_CPUTIME_ID __CLOCK_AVAILABILITY = 12,
|
|
172
|
+
#define CLOCK_PROCESS_CPUTIME_ID _CLOCK_PROCESS_CPUTIME_ID
|
|
173
|
+
_CLOCK_THREAD_CPUTIME_ID __CLOCK_AVAILABILITY = 16
|
|
174
|
+
#define CLOCK_THREAD_CPUTIME_ID _CLOCK_THREAD_CPUTIME_ID
|
|
175
|
+
} clockid_t;
|
|
176
|
+
|
|
177
|
+
__CLOCK_AVAILABILITY
|
|
178
|
+
int clock_getres(clockid_t __clock_id, struct timespec *__res);
|
|
179
|
+
|
|
180
|
+
__CLOCK_AVAILABILITY
|
|
181
|
+
int clock_gettime(clockid_t __clock_id, struct timespec *__tp);
|
|
182
|
+
|
|
183
|
+
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
|
184
|
+
__CLOCK_AVAILABILITY
|
|
185
|
+
__uint64_t clock_gettime_nsec_np(clockid_t __clock_id);
|
|
186
|
+
#endif
|
|
187
|
+
|
|
188
|
+
__OSX_AVAILABLE(10.12) __IOS_PROHIBITED
|
|
189
|
+
__TVOS_PROHIBITED __WATCHOS_PROHIBITED
|
|
190
|
+
int clock_settime(clockid_t __clock_id, const struct timespec *__tp);
|
|
191
|
+
|
|
192
|
+
#undef __CLOCK_AVAILABILITY
|
|
193
|
+
#endif /* __DARWIN_C_LEVEL */
|
|
194
|
+
#endif /* _DARWIN_FEATURE_CLOCK_GETTIME */
|
|
195
|
+
|
|
196
|
+
#if (__DARWIN_C_LEVEL >= __DARWIN_C_FULL) || \
|
|
197
|
+
(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
|
|
198
|
+
(defined(__cplusplus) && __cplusplus >= 201703L)
|
|
199
|
+
/* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */
|
|
200
|
+
#define TIME_UTC 1 /* time elapsed since epoch */
|
|
201
|
+
__API_AVAILABLE(macosx(10.15), ios(13.0), tvos(13.0), watchos(6.0))
|
|
202
|
+
int timespec_get(struct timespec *ts, int base);
|
|
203
|
+
#endif
|
|
204
|
+
|
|
205
|
+
__END_DECLS
|
|
206
|
+
|
|
207
|
+
#endif /* !_TIME_H_ */
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2000-2010 Apple Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/*-
|
|
5
|
+
* Copyright (c) 1990, 1993
|
|
6
|
+
* The Regents of the University of California. All rights reserved.
|
|
7
|
+
* (c) UNIX System Laboratories, Inc.
|
|
8
|
+
* All or some portions of this file are derived from material licensed
|
|
9
|
+
* to the University of California by American Telephone and Telegraph
|
|
10
|
+
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
|
11
|
+
* the permission of UNIX System Laboratories, Inc.
|
|
12
|
+
*
|
|
13
|
+
* Redistribution and use in source and binary forms, with or without
|
|
14
|
+
* modification, are permitted provided that the following conditions
|
|
15
|
+
* are met:
|
|
16
|
+
* 1. Redistributions of source code must retain the above copyright
|
|
17
|
+
* notice, this list of conditions and the following disclaimer.
|
|
18
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
|
19
|
+
* notice, this list of conditions and the following disclaimer in the
|
|
20
|
+
* documentation and/or other materials provided with the distribution.
|
|
21
|
+
* 3. All advertising materials mentioning features or use of this software
|
|
22
|
+
* must display the following acknowledgement:
|
|
23
|
+
* This product includes software developed by the University of
|
|
24
|
+
* California, Berkeley and its contributors.
|
|
25
|
+
* 4. Neither the name of the University nor the names of its contributors
|
|
26
|
+
* may be used to endorse or promote products derived from this software
|
|
27
|
+
* without specific prior written permission.
|
|
28
|
+
*
|
|
29
|
+
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
30
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
31
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
32
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
33
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
34
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
35
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
36
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
37
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
38
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
39
|
+
* SUCH DAMAGE.
|
|
40
|
+
*
|
|
41
|
+
* @(#)param.h 8.1 (Berkeley) 4/4/95
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
* Machine dependent constants for ARM
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
#ifndef _ARM_PARAM_H_
|
|
49
|
+
#define _ARM_PARAM_H_
|
|
50
|
+
|
|
51
|
+
#if defined (__arm__) || defined (__arm64__)
|
|
52
|
+
|
|
53
|
+
#include <arm/_param.h>
|
|
54
|
+
|
|
55
|
+
/*
|
|
56
|
+
* Round p (pointer or byte index) up to a correctly-aligned value for all
|
|
57
|
+
* data types (int, long, ...). The result is unsigned int and must be
|
|
58
|
+
* cast to any desired pointer type.
|
|
59
|
+
*/
|
|
60
|
+
#define ALIGNBYTES __DARWIN_ALIGNBYTES
|
|
61
|
+
#define ALIGN(p) __DARWIN_ALIGN(p)
|
|
62
|
+
|
|
63
|
+
#define NBPG 4096 /* bytes/page */
|
|
64
|
+
#define PGOFSET (NBPG-1) /* byte offset into page */
|
|
65
|
+
#define PGSHIFT 12 /* LOG2(NBPG) */
|
|
66
|
+
|
|
67
|
+
#define DEV_BSIZE 512
|
|
68
|
+
#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
|
|
69
|
+
#define BLKDEV_IOSIZE 2048
|
|
70
|
+
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
|
|
71
|
+
|
|
72
|
+
#define CLSIZE 1
|
|
73
|
+
#define CLSIZELOG2 0
|
|
74
|
+
|
|
75
|
+
/*
|
|
76
|
+
* Constants related to network buffer management.
|
|
77
|
+
* MCLBYTES must be no larger than CLBYTES (the software page size), and,
|
|
78
|
+
* on machines that exchange pages of input or output buffers with mbuf
|
|
79
|
+
* clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
|
|
80
|
+
* of the hardware page size.
|
|
81
|
+
*/
|
|
82
|
+
#define MSIZESHIFT 8 /* 256 */
|
|
83
|
+
#define MSIZE (1 << MSIZESHIFT) /* size of an mbuf */
|
|
84
|
+
#define MCLSHIFT 11 /* 2048 */
|
|
85
|
+
#define MCLBYTES (1 << MCLSHIFT) /* size of an mbuf cluster */
|
|
86
|
+
#define MBIGCLSHIFT 12 /* 4096 */
|
|
87
|
+
#define MBIGCLBYTES (1 << MBIGCLSHIFT) /* size of a big cluster */
|
|
88
|
+
#define M16KCLSHIFT 14 /* 16384 */
|
|
89
|
+
#define M16KCLBYTES (1 << M16KCLSHIFT) /* size of a jumbo cluster */
|
|
90
|
+
|
|
91
|
+
#define MCLOFSET (MCLBYTES - 1)
|
|
92
|
+
#ifndef NMBCLUSTERS
|
|
93
|
+
#define NMBCLUSTERS CONFIG_NMBCLUSTERS /* cl map size */
|
|
94
|
+
#endif
|
|
95
|
+
|
|
96
|
+
/*
|
|
97
|
+
* Some macros for units conversion
|
|
98
|
+
*/
|
|
99
|
+
/* Core clicks (NeXT_page_size bytes) to segments and vice versa */
|
|
100
|
+
#define ctos(x) (x)
|
|
101
|
+
#define stoc(x) (x)
|
|
102
|
+
|
|
103
|
+
/* Core clicks (4096 bytes) to disk blocks */
|
|
104
|
+
#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT))
|
|
105
|
+
#define dtoc(x) ((x)>>(PGSHIFT-DEV_BSHIFT))
|
|
106
|
+
#define dtob(x) ((x)<<DEV_BSHIFT)
|
|
107
|
+
|
|
108
|
+
/* clicks to bytes */
|
|
109
|
+
#define ctob(x) ((x)<<PGSHIFT)
|
|
110
|
+
|
|
111
|
+
/* bytes to clicks */
|
|
112
|
+
#define btoc(x) (((unsigned)(x)+(NBPG-1))>>PGSHIFT)
|
|
113
|
+
|
|
114
|
+
#ifdef __APPLE__
|
|
115
|
+
#define btodb(bytes, devBlockSize) \
|
|
116
|
+
((unsigned)(bytes) / devBlockSize)
|
|
117
|
+
#define dbtob(db, devBlockSize) \
|
|
118
|
+
((unsigned)(db) * devBlockSize)
|
|
119
|
+
#else
|
|
120
|
+
#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
|
|
121
|
+
((unsigned)(bytes) >> DEV_BSHIFT)
|
|
122
|
+
#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
|
|
123
|
+
((unsigned)(db) << DEV_BSHIFT)
|
|
124
|
+
#endif
|
|
125
|
+
|
|
126
|
+
/*
|
|
127
|
+
* Map a ``block device block'' to a file system block.
|
|
128
|
+
* This should be device dependent, and will be if we
|
|
129
|
+
* add an entry to cdevsw/bdevsw for that purpose.
|
|
130
|
+
* For now though just use DEV_BSIZE.
|
|
131
|
+
*/
|
|
132
|
+
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE))
|
|
133
|
+
|
|
134
|
+
/*
|
|
135
|
+
* Macros to decode (and encode) processor status word.
|
|
136
|
+
*/
|
|
137
|
+
#define STATUS_WORD(rpl, ipl) (((ipl) << 8) | (rpl))
|
|
138
|
+
#define USERMODE(x) (((x) & 3) == 3)
|
|
139
|
+
#define BASEPRI(x) (((x) & (255 << 8)) == 0)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
#if defined(KERNEL) || defined(STANDALONE)
|
|
143
|
+
#define DELAY(n) delay(n)
|
|
144
|
+
|
|
145
|
+
#else /* defined(KERNEL) || defined(STANDALONE) */
|
|
146
|
+
#define DELAY(n) { int N = (n); while (--N > 0); }
|
|
147
|
+
#endif /* defined(KERNEL) || defined(STANDALONE) */
|
|
148
|
+
|
|
149
|
+
#endif /* defined (__arm__) || defined (__arm64__) */
|
|
150
|
+
|
|
151
|
+
#endif /* _ARM_PARAM_H_ */
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2000, 2005, 2008 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
|
+
* Copyright (c) 1989, 1993
|
|
25
|
+
* The Regents of the University of California. All rights reserved.
|
|
26
|
+
* (c) UNIX System Laboratories, Inc.
|
|
27
|
+
* All or some portions of this file are derived from material licensed
|
|
28
|
+
* to the University of California by American Telephone and Telegraph
|
|
29
|
+
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
|
30
|
+
* the permission of UNIX System Laboratories, Inc.
|
|
31
|
+
*
|
|
32
|
+
* This code is derived from software contributed to Berkeley by
|
|
33
|
+
* Paul Borman at Krystal Technologies.
|
|
34
|
+
*
|
|
35
|
+
* Redistribution and use in source and binary forms, with or without
|
|
36
|
+
* modification, are permitted provided that the following conditions
|
|
37
|
+
* are met:
|
|
38
|
+
* 1. Redistributions of source code must retain the above copyright
|
|
39
|
+
* notice, this list of conditions and the following disclaimer.
|
|
40
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
|
41
|
+
* notice, this list of conditions and the following disclaimer in the
|
|
42
|
+
* documentation and/or other materials provided with the distribution.
|
|
43
|
+
* 3. All advertising materials mentioning features or use of this software
|
|
44
|
+
* must display the following acknowledgement:
|
|
45
|
+
* This product includes software developed by the University of
|
|
46
|
+
* California, Berkeley and its contributors.
|
|
47
|
+
* 4. Neither the name of the University nor the names of its contributors
|
|
48
|
+
* may be used to endorse or promote products derived from this software
|
|
49
|
+
* without specific prior written permission.
|
|
50
|
+
*
|
|
51
|
+
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
52
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
53
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
54
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
55
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
56
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
57
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
58
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
59
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
60
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
61
|
+
* SUCH DAMAGE.
|
|
62
|
+
*
|
|
63
|
+
* @(#)ctype.h 8.4 (Berkeley) 1/21/94
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
#include <_ctype.h>
|
|
67
|
+
|
|
68
|
+
#ifdef _USE_EXTENDED_LOCALES_
|
|
69
|
+
#include <xlocale/_ctype.h>
|
|
70
|
+
#endif /* _USE_EXTENDED_LOCALES_ */
|