mirror of
https://github.com/ziglang/zig.git
synced 2025-12-30 01:53:16 +00:00
Merge remote-tracking branch 'origin/master' into llvm14
This commit is contained in:
commit
f59bd2be53
@ -4,6 +4,10 @@
|
||||
#ifndef _ARM__LIMITS_H_
|
||||
#define _ARM__LIMITS_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
#define __DARWIN_CLK_TCK 100 /* ticks per second */
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* _ARM__LIMITS_H_ */
|
||||
@ -29,6 +29,8 @@
|
||||
#ifndef __ARM_MCONTEXT_H_
|
||||
#define __ARM_MCONTEXT_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
#include <sys/cdefs.h> /* __DARWIN_UNIX03 */
|
||||
#include <sys/appleapiopts.h>
|
||||
#include <mach/machine/_structs.h>
|
||||
@ -88,4 +90,6 @@ typedef _STRUCT_MCONTEXT32 *mcontext_t;
|
||||
#endif
|
||||
#endif /* _MCONTEXT_T */
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* __ARM_MCONTEXT_H_ */
|
||||
@ -5,6 +5,8 @@
|
||||
#ifndef _ARM__PARAM_H_
|
||||
#define _ARM__PARAM_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
#include <arm/_types.h>
|
||||
|
||||
/*
|
||||
@ -18,5 +20,6 @@
|
||||
#define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1)
|
||||
#define __DARWIN_ALIGN32(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32)
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* _ARM__PARAM_H_ */
|
||||
@ -4,6 +4,8 @@
|
||||
#ifndef _BSD_ARM__TYPES_H_
|
||||
#define _BSD_ARM__TYPES_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
/*
|
||||
* This header file contains integer types. It's intended to also contain
|
||||
* flotaing point and other arithmetic types, as needed, later.
|
||||
@ -95,4 +97,6 @@ typedef __uint32_t __darwin_socklen_t; /* socklen_t (duh) */
|
||||
typedef long __darwin_ssize_t; /* byte count or error */
|
||||
typedef long __darwin_time_t; /* time() */
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* _BSD_ARM__TYPES_H_ */
|
||||
@ -28,6 +28,8 @@
|
||||
#ifndef _ARM_ARCH_H
|
||||
#define _ARM_ARCH_H
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
/* Collect the __ARM_ARCH_*__ compiler flags into something easier to use. */
|
||||
#if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7S__) || defined (__ARM_ARCH_7F__) || defined (__ARM_ARCH_7K__)
|
||||
#define _ARM_ARCH_7
|
||||
@ -64,4 +66,6 @@
|
||||
#define _ARM_ARCH_4
|
||||
#endif
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif
|
||||
@ -42,6 +42,8 @@
|
||||
#ifndef _ARM__ENDIAN_H_
|
||||
#define _ARM__ENDIAN_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
/*
|
||||
* Define _NOQUAD if the compiler does NOT support 64-bit integers.
|
||||
@ -75,4 +77,5 @@
|
||||
#include <sys/_endian.h>
|
||||
|
||||
#endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
#endif /* !_ARM__ENDIAN_H_ */
|
||||
@ -39,6 +39,8 @@
|
||||
#ifndef _ARM_LIMITS_H_
|
||||
#define _ARM_LIMITS_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <arm/_limits.h>
|
||||
|
||||
@ -107,4 +109,6 @@
|
||||
#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */
|
||||
#endif /* !_ANSI_SOURCE */
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* _ARM_LIMITS_H_ */
|
||||
@ -48,6 +48,8 @@
|
||||
#ifndef _ARM_PARAM_H_
|
||||
#define _ARM_PARAM_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
#include <arm/_param.h>
|
||||
|
||||
/*
|
||||
@ -144,4 +146,6 @@
|
||||
#define DELAY(n) { int N = (n); while (--N > 0); }
|
||||
#endif /* defined(KERNEL) || defined(STANDALONE) */
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* _ARM_PARAM_H_ */
|
||||
@ -9,10 +9,14 @@
|
||||
#ifndef _ARM_SIGNAL_
|
||||
#define _ARM_SIGNAL_ 1
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifndef _ANSI_SOURCE
|
||||
typedef int sig_atomic_t;
|
||||
#endif /* ! _ANSI_SOURCE */
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* _ARM_SIGNAL_ */
|
||||
@ -39,9 +39,12 @@
|
||||
* @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
*/
|
||||
|
||||
#ifndef _MACHTYPES_H_
|
||||
#ifndef _ARM_MACHTYPES_H_
|
||||
#define _ARM_MACHTYPES_H_
|
||||
#define _MACHTYPES_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
#include <arm/_types.h>
|
||||
#include <sys/cdefs.h>
|
||||
@ -104,4 +107,5 @@ typedef u_int64_t syscall_arg_t;
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLER__ */
|
||||
#endif /* _MACHTYPES_H_ */
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
#endif /* _ARM_MACHTYPES_H_ */
|
||||
@ -31,6 +31,8 @@
|
||||
#ifndef _MACH_ARM__STRUCTS_H_
|
||||
#define _MACH_ARM__STRUCTS_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
#include <sys/cdefs.h> /* __DARWIN_UNIX03 */
|
||||
#include <machine/types.h> /* __uint32_t */
|
||||
|
||||
@ -507,25 +509,6 @@ _STRUCT_ARM_NEON_STATE
|
||||
|
||||
#endif /* __DARWIN_UNIX03 */
|
||||
|
||||
#if __DARWIN_UNIX03
|
||||
#define _STRUCT_ARM_AMX_STATE_V1 struct __darwin_arm_amx_state_v1
|
||||
_STRUCT_ARM_AMX_STATE_V1
|
||||
{
|
||||
__uint8_t __x[8][64]; /* 8 64-byte registers */
|
||||
__uint8_t __y[8][64]; /* 8 64-byte registers */
|
||||
__uint8_t __z[64][64]; /* 64 64-byte registers in an M-by-N matrix */
|
||||
__uint64_t __amx_state_t_el1; /* AMX_STATE_T_EL1 value */
|
||||
} __attribute__((aligned(64)));
|
||||
#else /* !__DARWIN_UNIX03 */
|
||||
#define _STRUCT_ARM_AMX_STATE_V1 struct arm_amx_state_v1
|
||||
_STRUCT_ARM_AMX_STATE_V1
|
||||
{
|
||||
__uint8_t x[8][64]; /* 8 64-byte registers */
|
||||
__uint8_t y[8][64]; /* 8 64-byte registers */
|
||||
__uint8_t z[64][64]; /* 64 64-byte registers in an M-by-N matrix */
|
||||
__uint64_t amx_state_t_el1; /* AMX_STATE_T_EL1 value. */
|
||||
} __attribute__((aligned(64)));
|
||||
#endif /* __DARWIN_UNIX03 */
|
||||
|
||||
#define _STRUCT_ARM_PAGEIN_STATE struct __arm_pagein_state
|
||||
_STRUCT_ARM_PAGEIN_STATE
|
||||
@ -642,4 +625,6 @@ _STRUCT_ARM_CPMU_STATE64
|
||||
};
|
||||
#endif /* !__DARWIN_UNIX03 */
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* _MACH_ARM__STRUCTS_H_ */
|
||||
@ -65,6 +65,10 @@
|
||||
#ifndef _MACH_ARM_BOOLEAN_H_
|
||||
#define _MACH_ARM_BOOLEAN_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
typedef int boolean_t;
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* _MACH_ARM_BOOLEAN_H_ */
|
||||
@ -29,6 +29,8 @@
|
||||
#ifndef _MACH_ARM_EXCEPTION_H_
|
||||
#define _MACH_ARM_EXCEPTION_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
#define EXC_TYPES_COUNT 14 /* incl. illegal exception 0 */
|
||||
|
||||
#define EXC_MASK_MACHINE 0
|
||||
@ -75,5 +77,6 @@
|
||||
|
||||
#define EXC_ARM_BREAKPOINT 1 /* breakpoint trap */
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* _MACH_ARM_EXCEPTION_H_ */
|
||||
@ -67,8 +67,12 @@
|
||||
#ifndef _MACH_ARM_KERN_RETURN_H_
|
||||
#define _MACH_ARM_KERN_RETURN_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
#ifndef ASSEMBLER
|
||||
typedef int kern_return_t;
|
||||
#endif /* ASSEMBLER */
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* _MACH_ARM_KERN_RETURN_H_ */
|
||||
@ -29,6 +29,8 @@
|
||||
#ifndef _MACH_ARM_PROCESSOR_INFO_H_
|
||||
#define _MACH_ARM_PROCESSOR_INFO_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
#define PROCESSOR_CPU_STAT 0x10000003 /* Low-level CPU statistics */
|
||||
#define PROCESSOR_CPU_STAT64 0x10000004 /* Low-level CPU statistics, in full 64-bit */
|
||||
|
||||
@ -69,4 +71,6 @@ typedef struct processor_cpu_stat64 *processor_cpu_stat64_t;
|
||||
#define PROCESSOR_CPU_STAT64_COUNT ((mach_msg_type_number_t) \
|
||||
(sizeof(processor_cpu_stat64_data_t) / sizeof(integer_t)))
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* _MACH_ARM_PROCESSOR_INFO_H_ */
|
||||
@ -32,4 +32,8 @@
|
||||
#ifndef _MACH_ARM_RPC_H_
|
||||
#define _MACH_ARM_RPC_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* _MACH_ARM_RPC_H_ */
|
||||
@ -32,13 +32,11 @@
|
||||
#ifndef _MACH_ARM_THREAD_STATE_H_
|
||||
#define _MACH_ARM_THREAD_STATE_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
/* Size of maximum exported thread state in words */
|
||||
#define ARM_THREAD_STATE_MAX (1296) /* Size of biggest state possible */
|
||||
|
||||
#if defined (__arm__) || defined(__arm64__)
|
||||
#define THREAD_STATE_MAX ARM_THREAD_STATE_MAX
|
||||
#else
|
||||
#error Unsupported arch
|
||||
#endif
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* _MACH_ARM_THREAD_STATE_H_ */
|
||||
@ -33,10 +33,12 @@
|
||||
#ifndef _ARM_THREAD_STATUS_H_
|
||||
#define _ARM_THREAD_STATUS_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
#include <mach/machine/_structs.h>
|
||||
#include <mach/machine/thread_state.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/vm_types.h>
|
||||
#include <mach/arm/thread_state.h>
|
||||
|
||||
/*
|
||||
* Support for determining the state of a thread
|
||||
@ -67,13 +69,12 @@
|
||||
#define ARM_CPMU_STATE64 18
|
||||
|
||||
|
||||
/* API */
|
||||
#define ARM_AMX_STATE 24
|
||||
#define ARM_AMX_STATE_V1 25
|
||||
#define ARM_STATE_FLAVOR_IS_OTHER_VALID(_flavor_) \
|
||||
((_flavor_) == ARM_AMX_STATE_V1)
|
||||
#define ARM_PAGEIN_STATE 27
|
||||
|
||||
#ifndef ARM_STATE_FLAVOR_IS_OTHER_VALID
|
||||
#define ARM_STATE_FLAVOR_IS_OTHER_VALID(_flavor_) 0
|
||||
#endif
|
||||
|
||||
#define VALID_THREAD_STATE_FLAVOR(x) \
|
||||
((x == ARM_THREAD_STATE) || \
|
||||
(x == ARM_VFP_STATE) || \
|
||||
@ -170,7 +171,6 @@ typedef _STRUCT_ARM_NEON_STATE arm_neon_state_t;
|
||||
typedef _STRUCT_ARM_NEON_STATE arm_neon_state32_t;
|
||||
typedef _STRUCT_ARM_NEON_STATE64 arm_neon_state64_t;
|
||||
|
||||
typedef _STRUCT_ARM_AMX_STATE_V1 arm_amx_state_v1_t;
|
||||
|
||||
typedef _STRUCT_ARM_EXCEPTION_STATE arm_exception_state_t;
|
||||
typedef _STRUCT_ARM_EXCEPTION_STATE arm_exception_state32_t;
|
||||
@ -224,26 +224,12 @@ typedef _STRUCT_ARM_LEGACY_DEBUG_STATE arm_debug_state_t;
|
||||
#define MACHINE_THREAD_STATE_COUNT ARM_UNIFIED_THREAD_STATE_COUNT
|
||||
|
||||
|
||||
struct arm_amx_state {
|
||||
arm_state_hdr_t ash;
|
||||
union {
|
||||
arm_amx_state_v1_t as_v1;
|
||||
} uas;
|
||||
};
|
||||
#define as_v1 uas.as_v1
|
||||
typedef struct arm_amx_state arm_amx_state_t;
|
||||
|
||||
#define ARM_AMX_STATE_V1_COUNT ((mach_msg_type_number_t) \
|
||||
(sizeof(arm_amx_state_v1_t)/sizeof(unsigned int)))
|
||||
|
||||
#define ARM_AMX_STATE_COUNT ((mach_msg_type_number_t) \
|
||||
(sizeof(arm_amx_state_t)/sizeof(unsigned int)))
|
||||
|
||||
|
||||
/*
|
||||
* Largest state on this machine:
|
||||
*/
|
||||
#define THREAD_MACHINE_STATE_MAX THREAD_STATE_MAX
|
||||
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* _ARM_THREAD_STATUS_H_ */
|
||||
@ -36,6 +36,8 @@
|
||||
#ifndef _MACH_ARM_VM_PARAM_H_
|
||||
#define _MACH_ARM_VM_PARAM_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
|
||||
#if !defined (KERNEL) && !defined (__ASSEMBLER__)
|
||||
#include <mach/vm_page_size.h>
|
||||
@ -104,4 +106,6 @@
|
||||
|
||||
#define SWI_SYSCALL 0x80
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* _MACH_ARM_VM_PARAM_H_ */
|
||||
@ -67,11 +67,14 @@
|
||||
#ifndef _MACH_ARM_VM_TYPES_H_
|
||||
#define _MACH_ARM_VM_TYPES_H_
|
||||
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
#ifndef ASSEMBLER
|
||||
|
||||
#include <arm/_types.h>
|
||||
#include <stdint.h>
|
||||
#include <Availability.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
/*
|
||||
* natural_t and integer_t are Mach's legacy types for machine-
|
||||
@ -98,18 +101,18 @@ typedef int integer_t;
|
||||
* e.g. an offset into a virtual memory space.
|
||||
*/
|
||||
#ifdef __LP64__
|
||||
typedef uintptr_t vm_offset_t;
|
||||
typedef uintptr_t vm_offset_t __kernel_ptr_semantics;
|
||||
typedef uintptr_t vm_size_t;
|
||||
|
||||
typedef uint64_t mach_vm_address_t;
|
||||
typedef uint64_t mach_vm_offset_t;
|
||||
typedef uint64_t mach_vm_address_t __kernel_ptr_semantics;
|
||||
typedef uint64_t mach_vm_offset_t __kernel_ptr_semantics;
|
||||
typedef uint64_t mach_vm_size_t;
|
||||
|
||||
typedef uint64_t vm_map_offset_t;
|
||||
typedef uint64_t vm_map_address_t;
|
||||
typedef uint64_t vm_map_offset_t __kernel_ptr_semantics;
|
||||
typedef uint64_t vm_map_address_t __kernel_ptr_semantics;
|
||||
typedef uint64_t vm_map_size_t;
|
||||
#else
|
||||
typedef natural_t vm_offset_t;
|
||||
typedef natural_t vm_offset_t __kernel_ptr_semantics;
|
||||
/*
|
||||
* A vm_size_t is the proper type for e.g.
|
||||
* expressing the difference between two
|
||||
@ -129,13 +132,13 @@ typedef uint32_t mach_vm_address_t;
|
||||
typedef uint32_t mach_vm_offset_t;
|
||||
typedef uint32_t mach_vm_size_t;
|
||||
#else
|
||||
typedef uint64_t mach_vm_address_t;
|
||||
typedef uint64_t mach_vm_offset_t;
|
||||
typedef uint64_t mach_vm_address_t __kernel_ptr_semantics;
|
||||
typedef uint64_t mach_vm_offset_t __kernel_ptr_semantics;
|
||||
typedef uint64_t mach_vm_size_t;
|
||||
#endif
|
||||
|
||||
typedef uint32_t vm_map_offset_t;
|
||||
typedef uint32_t vm_map_address_t;
|
||||
typedef uint32_t vm_map_offset_t __kernel_ptr_semantics;
|
||||
typedef uint32_t vm_map_address_t __kernel_ptr_semantics;
|
||||
typedef uint32_t vm_map_size_t;
|
||||
#endif /* __LP64__ */
|
||||
|
||||
@ -154,4 +157,6 @@ typedef vm_offset_t mach_port_context_t;
|
||||
*/
|
||||
#define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32
|
||||
|
||||
#endif /* defined (__arm__) || defined (__arm64__) */
|
||||
|
||||
#endif /* _MACH_ARM_VM_TYPES_H_ */
|
||||
@ -184,6 +184,7 @@ _STRUCT_ARM_THREAD_STATE64
|
||||
|
||||
#define __DARWIN_ARM_THREAD_STATE64_FLAGS_NO_PTRAUTH 0x1
|
||||
#define __DARWIN_ARM_THREAD_STATE64_FLAGS_IB_SIGNED_LR 0x2
|
||||
#define __DARWIN_ARM_THREAD_STATE64_FLAGS_KERNEL_SIGNED 0x4
|
||||
|
||||
/* Return pc field of arm_thread_state64_t as a data pointer value */
|
||||
#define __darwin_arm_thread_state64_get_pc(ts) \
|
||||
@ -212,7 +213,9 @@ _STRUCT_ARM_THREAD_STATE64
|
||||
ptrauth_auth_and_resign(__f, ptrauth_key_function_pointer, 0, \
|
||||
ptrauth_key_process_independent_code, \
|
||||
ptrauth_string_discriminator("pc")) : ptrauth_auth_data(__f, \
|
||||
ptrauth_key_function_pointer, 0)) : __f); })
|
||||
ptrauth_key_function_pointer, 0)) : __f); \
|
||||
__tsp->__opaque_flags &= \
|
||||
~__DARWIN_ARM_THREAD_STATE64_FLAGS_KERNEL_SIGNED; })
|
||||
/* Return lr field of arm_thread_state64_t as a data pointer value */
|
||||
#define __darwin_arm_thread_state64_get_lr(ts) \
|
||||
__extension__ ({ const _STRUCT_ARM_THREAD_STATE64 *__tsp = &(ts); \
|
||||
@ -243,7 +246,8 @@ _STRUCT_ARM_THREAD_STATE64
|
||||
ptrauth_auth_and_resign(__f, ptrauth_key_function_pointer, 0, \
|
||||
ptrauth_key_process_independent_code, \
|
||||
ptrauth_string_discriminator("lr"))) : ptrauth_auth_data(__f, \
|
||||
ptrauth_key_function_pointer, 0)) : __f); })
|
||||
ptrauth_key_function_pointer, 0)) : __f); __tsp->__opaque_flags &= \
|
||||
~__DARWIN_ARM_THREAD_STATE64_FLAGS_KERNEL_SIGNED; })
|
||||
/* Return sp field of arm_thread_state64_t as a data pointer value */
|
||||
#define __darwin_arm_thread_state64_get_sp(ts) \
|
||||
__extension__ ({ const _STRUCT_ARM_THREAD_STATE64 *__tsp = &(ts); \
|
||||
@ -260,7 +264,9 @@ _STRUCT_ARM_THREAD_STATE64
|
||||
__DARWIN_ARM_THREAD_STATE64_FLAGS_NO_PTRAUTH) ? \
|
||||
ptrauth_sign_unauthenticated(__p, \
|
||||
ptrauth_key_process_independent_data, \
|
||||
ptrauth_string_discriminator("sp")) : __p); })
|
||||
ptrauth_string_discriminator("sp")) : __p); \
|
||||
__tsp->__opaque_flags &= \
|
||||
~__DARWIN_ARM_THREAD_STATE64_FLAGS_KERNEL_SIGNED; })
|
||||
/* Return fp field of arm_thread_state64_t as a data pointer value */
|
||||
#define __darwin_arm_thread_state64_get_fp(ts) \
|
||||
__extension__ ({ const _STRUCT_ARM_THREAD_STATE64 *__tsp = &(ts); \
|
||||
@ -277,7 +283,9 @@ _STRUCT_ARM_THREAD_STATE64
|
||||
__DARWIN_ARM_THREAD_STATE64_FLAGS_NO_PTRAUTH) ? \
|
||||
ptrauth_sign_unauthenticated(__p, \
|
||||
ptrauth_key_process_independent_data, \
|
||||
ptrauth_string_discriminator("fp")) : __p); })
|
||||
ptrauth_string_discriminator("fp")) : __p); \
|
||||
__tsp->__opaque_flags &= \
|
||||
~__DARWIN_ARM_THREAD_STATE64_FLAGS_KERNEL_SIGNED; })
|
||||
|
||||
/* Strip ptr auth bits from pc, lr, sp and fp field of arm_thread_state64_t */
|
||||
#define __darwin_arm_thread_state64_ptrauth_strip(ts) \
|
||||
@ -296,7 +304,8 @@ _STRUCT_ARM_THREAD_STATE64
|
||||
__DARWIN_ARM_THREAD_STATE64_FLAGS_NO_PTRAUTH) ? __tsp->__opaque_fp : \
|
||||
ptrauth_strip(__tsp->__opaque_fp, ptrauth_key_process_independent_data)); \
|
||||
__tsp->__opaque_flags |= \
|
||||
__DARWIN_ARM_THREAD_STATE64_FLAGS_NO_PTRAUTH; })
|
||||
__DARWIN_ARM_THREAD_STATE64_FLAGS_NO_PTRAUTH; __tsp->__opaque_flags &= \
|
||||
~__DARWIN_ARM_THREAD_STATE64_FLAGS_KERNEL_SIGNED; })
|
||||
|
||||
#else /* __has_feature(ptrauth_calls) && defined(__LP64__) */
|
||||
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
#if defined (__arm__) || defined (__arm64__)
|
||||
|
||||
|
||||
|
||||
#if !defined (KERNEL) && !defined (__ASSEMBLER__)
|
||||
#include <mach/vm_page_size.h>
|
||||
#endif
|
||||
|
||||
@ -214,10 +214,15 @@
|
||||
* If you do not define DEBUG_ASSERT_MESSAGE, a simple printf to stderr will be used.
|
||||
*/
|
||||
#ifndef DEBUG_ASSERT_MESSAGE
|
||||
#include <TargetConditionals.h>
|
||||
#ifdef KERNEL
|
||||
#include <libkern/libkern.h>
|
||||
#define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \
|
||||
printf( "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value));
|
||||
#elif TARGET_OS_DRIVERKIT
|
||||
#include <os/log.h>
|
||||
#define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \
|
||||
os_log(OS_LOG_DEFAULT, "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value));
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \
|
||||
|
||||
12
lib/libc/include/any-macos-any/assert.h
vendored
12
lib/libc/include/any-macos-any/assert.h
vendored
@ -56,6 +56,12 @@
|
||||
#define assert(e) ((void)0)
|
||||
#else
|
||||
|
||||
#ifdef __FILE_NAME__
|
||||
#define __ASSERT_FILE_NAME __FILE_NAME__
|
||||
#else /* __FILE_NAME__ */
|
||||
#define __ASSERT_FILE_NAME __FILE__
|
||||
#endif /* __FILE_NAME__ */
|
||||
|
||||
#ifndef __GNUC__
|
||||
|
||||
__BEGIN_DECLS
|
||||
@ -66,7 +72,7 @@ int printf(const char * __restrict, ...);
|
||||
__END_DECLS
|
||||
|
||||
#define assert(e) \
|
||||
((void) ((e) ? ((void)0) : __assert (#e, __FILE__, __LINE__)))
|
||||
((void) ((e) ? ((void)0) : __assert (#e, __ASSERT_FILE_NAME, __LINE__)))
|
||||
#define __assert(e, file, line) \
|
||||
((void)printf ("%s:%d: failed assertion `%s'\n", file, line, e), abort())
|
||||
|
||||
@ -90,10 +96,10 @@ __END_DECLS
|
||||
|
||||
#if __DARWIN_UNIX03
|
||||
#define assert(e) \
|
||||
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
|
||||
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __ASSERT_FILE_NAME, __LINE__, #e) : (void)0)
|
||||
#else /* !__DARWIN_UNIX03 */
|
||||
#define assert(e) \
|
||||
(__builtin_expect(!(e), 0) ? __assert (#e, __FILE__, __LINE__) : (void)0)
|
||||
(__builtin_expect(!(e), 0) ? __assert (#e, __ASSERT_FILE_NAME, __LINE__) : (void)0)
|
||||
#endif /* __DARWIN_UNIX03 */
|
||||
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
@ -70,6 +70,7 @@
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/port.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
|
||||
@ -82,7 +83,6 @@ typedef char * io_buf_ptr_t;
|
||||
* Some types for IOKit.
|
||||
*/
|
||||
|
||||
#ifdef IOKIT
|
||||
|
||||
/* must match device_types.defs */
|
||||
typedef char io_name_t[128];
|
||||
@ -113,6 +113,5 @@ typedef mach_port_t io_object_t;
|
||||
#endif /* __IOKIT_PORTS_DEFINED__ */
|
||||
|
||||
|
||||
#endif /* IOKIT */
|
||||
|
||||
#endif /* DEVICE_TYPES_H */
|
||||
27
lib/libc/include/any-macos-any/dispatch/base.h
vendored
27
lib/libc/include/any-macos-any/dispatch/base.h
vendored
@ -127,6 +127,33 @@
|
||||
#define DISPATCH_UNAVAILABLE_MSG(msg)
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
# if __cplusplus >= 201703L
|
||||
# define DISPATCH_FALLTHROUGH [[fallthrough]]
|
||||
# elif __cplusplus >= 201103L
|
||||
# if defined(__clang__)
|
||||
# define DISPATCH_FALLTHROUGH [[clang::fallthrough]]
|
||||
# elif defined(__GNUC__) && __GNUC__ >= 7
|
||||
# define DISPATCH_FALLTHROUGH [[gnu::fallthrough]]
|
||||
# else
|
||||
# define DISPATCH_FALLTHROUGH
|
||||
# endif
|
||||
# else
|
||||
# define DISPATCH_FALLTHROUGH
|
||||
# endif
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 7
|
||||
# define DISPATCH_FALLTHROUGH __attribute__((__fallthrough__))
|
||||
#elif defined(__clang__)
|
||||
# if __has_attribute(fallthrough) && __clang_major__ >= 5
|
||||
# define DISPATCH_FALLTHROUGH __attribute__((__fallthrough__))
|
||||
# else
|
||||
# define DISPATCH_FALLTHROUGH
|
||||
# endif
|
||||
#else
|
||||
# define DISPATCH_FALLTHROUGH
|
||||
#endif
|
||||
|
||||
|
||||
#define DISPATCH_LINUX_UNAVAILABLE()
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
|
||||
35
lib/libc/include/any-macos-any/execinfo.h
vendored
35
lib/libc/include/any-macos-any/execinfo.h
vendored
@ -27,6 +27,7 @@
|
||||
#include <Availability.h>
|
||||
#include <os/base.h>
|
||||
#include <os/availability.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <uuid/uuid.h>
|
||||
|
||||
@ -58,6 +59,40 @@ OS_EXPORT
|
||||
void backtrace_image_offsets(void* const* array,
|
||||
struct image_offset *image_offsets, int size);
|
||||
|
||||
/*!
|
||||
* @function backtrace_async
|
||||
* Extracts the function return addresses of the current call stack. While
|
||||
* backtrace() will only follow the OS call stack, backtrace_async() will
|
||||
* prefer the unwind the Swift concurrency continuation stack if invoked
|
||||
* from within an async context. In a non-async context this function is
|
||||
* strictly equivalent to backtrace().
|
||||
*
|
||||
* @param array
|
||||
* The array of pointers to fill with the return addresses.
|
||||
*
|
||||
* @param length
|
||||
* The maximum number of pointers to write.
|
||||
*
|
||||
* @param task_id
|
||||
* Can be NULL. If non-NULL, the uint32_t pointed to by `task_id` is set to
|
||||
* a non-zero value that for the current process uniquely identifies the async
|
||||
* task currently running. If called from a non-async context, the value is
|
||||
* set to 0 and `array` contains the same values backtrace() would return.
|
||||
*
|
||||
* Note that the continuation addresses provided by backtrace_async()
|
||||
* have an offset of 1 added to them. Most symbolication engines will
|
||||
* substract 1 from the call stack return addresses in order to symbolicate
|
||||
* the call site rather than the return location. With a Swift async
|
||||
* continuation, substracting 1 from its address would result in an address
|
||||
* in a different function. This offset allows the returned addresses to be
|
||||
* handled correctly by most existing symbolication engines.
|
||||
*
|
||||
* @result
|
||||
* The number of pointers actually written.
|
||||
*/
|
||||
API_AVAILABLE(macosx(12.0), ios(15.0), tvos(15.0), watchos(8.0))
|
||||
size_t backtrace_async(void** array, size_t length, uint32_t *task_id);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_EXECINFO_H_ */
|
||||
2
lib/libc/include/any-macos-any/gethostuuid.h
vendored
2
lib/libc/include/any-macos-any/gethostuuid.h
vendored
@ -36,7 +36,7 @@
|
||||
#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0)
|
||||
int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_NA, __MAC_NA, __IPHONE_2_0, __IPHONE_5_0, "gethostuuid() is no longer supported");
|
||||
#else
|
||||
int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA);
|
||||
int gethostuuid(uuid_t, const struct timespec *) __API_AVAILABLE(macos(10.5)) __API_UNAVAILABLE(ios, tvos, watchos);
|
||||
#endif
|
||||
|
||||
#endif /* __GETHOSTUUID_H */
|
||||
23
lib/libc/include/any-macos-any/libproc.h
vendored
23
lib/libc/include/any-macos-any/libproc.h
vendored
@ -161,27 +161,12 @@ int proc_setthread_csm(uint32_t flags) __API_AVAILABLE(macos(11.0));
|
||||
#define PROC_CSM_NOSMT 0x0002 /* Set NO_SMT - see above */
|
||||
#define PROC_CSM_TECS 0x0004 /* Execute VERW on every return to user mode */
|
||||
|
||||
#ifdef PRIVATE
|
||||
#include <sys/event.h>
|
||||
/*
|
||||
* Enumerate potential userspace pointers embedded in kernel data structures.
|
||||
* Currently inspects kqueues only.
|
||||
*
|
||||
* NOTE: returned "pointers" are opaque user-supplied values and thus not
|
||||
* guaranteed to address valid objects or be pointers at all.
|
||||
*
|
||||
* Returns the number of pointers found (which may exceed buffersize), or -1 on
|
||||
* failure and errno set appropriately.
|
||||
*/
|
||||
int proc_list_uptrs(pid_t pid, uint64_t *buffer, uint32_t buffersize);
|
||||
|
||||
int proc_list_dynkqueueids(int pid, kqueue_id_t *buf, uint32_t bufsz);
|
||||
int proc_piddynkqueueinfo(int pid, int flavor, kqueue_id_t kq_id, void *buffer,
|
||||
int buffersize);
|
||||
#endif /* PRIVATE */
|
||||
|
||||
int proc_udata_info(int pid, int flavor, void *buffer, int buffersize);
|
||||
|
||||
#if __has_include(<libproc_private.h>)
|
||||
#include <libproc_private.h>
|
||||
#endif
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /*_LIBPROC_H_ */
|
||||
1
lib/libc/include/any-macos-any/mach/clock.h
vendored
1
lib/libc/include/any-macos-any/mach/clock.h
vendored
@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t;
|
||||
#define clock_MSG_COUNT 3
|
||||
#endif /* clock_MSG_COUNT */
|
||||
|
||||
#include <Availability.h>
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
|
||||
@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t;
|
||||
#define clock_priv_MSG_COUNT 2
|
||||
#endif /* clock_priv_MSG_COUNT */
|
||||
|
||||
#include <Availability.h>
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
|
||||
@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t;
|
||||
#define host_priv_MSG_COUNT 26
|
||||
#endif /* host_priv_MSG_COUNT */
|
||||
|
||||
#include <Availability.h>
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
|
||||
@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t;
|
||||
#define host_security_MSG_COUNT 2
|
||||
#endif /* host_security_MSG_COUNT */
|
||||
|
||||
#include <Availability.h>
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
|
||||
@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t;
|
||||
#define lock_set_MSG_COUNT 6
|
||||
#endif /* lock_set_MSG_COUNT */
|
||||
|
||||
#include <Availability.h>
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
|
||||
4
lib/libc/include/any-macos-any/mach/mach.h
vendored
4
lib/libc/include/any-macos-any/mach/mach.h
vendored
@ -85,10 +85,6 @@ __BEGIN_DECLS
|
||||
extern void panic_init(mach_port_t);
|
||||
extern void panic(const char *, ...);
|
||||
|
||||
extern void safe_gets(char *,
|
||||
char *,
|
||||
int);
|
||||
|
||||
extern void slot_name(cpu_type_t,
|
||||
cpu_subtype_t,
|
||||
char **,
|
||||
|
||||
22
lib/libc/include/any-macos-any/mach/mach_host.h
vendored
22
lib/libc/include/any-macos-any/mach/mach_host.h
vendored
@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t;
|
||||
#define mach_host_MSG_COUNT 35
|
||||
#endif /* mach_host_MSG_COUNT */
|
||||
|
||||
#include <Availability.h>
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
@ -74,8 +75,7 @@ mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
__WATCHOS_PROHIBITED
|
||||
__TVOS_PROHIBITED
|
||||
__TVOS_PROHIBITED __WATCHOS_PROHIBITED
|
||||
kern_return_t host_info
|
||||
(
|
||||
host_t host,
|
||||
@ -251,8 +251,7 @@ mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
__WATCHOS_PROHIBITED
|
||||
__TVOS_PROHIBITED
|
||||
__TVOS_PROHIBITED __WATCHOS_PROHIBITED
|
||||
kern_return_t host_request_notification
|
||||
(
|
||||
host_t host,
|
||||
@ -308,8 +307,7 @@ mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
__WATCHOS_PROHIBITED
|
||||
__TVOS_PROHIBITED
|
||||
__TVOS_PROHIBITED __WATCHOS_PROHIBITED
|
||||
kern_return_t host_create_mach_voucher
|
||||
(
|
||||
host_t host,
|
||||
@ -324,8 +322,7 @@ mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
__WATCHOS_PROHIBITED
|
||||
__TVOS_PROHIBITED
|
||||
__TVOS_PROHIBITED __WATCHOS_PROHIBITED
|
||||
kern_return_t host_register_mach_voucher_attr_manager
|
||||
(
|
||||
host_t host,
|
||||
@ -341,8 +338,7 @@ mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
__WATCHOS_PROHIBITED
|
||||
__TVOS_PROHIBITED
|
||||
__TVOS_PROHIBITED __WATCHOS_PROHIBITED
|
||||
kern_return_t host_register_well_known_mach_voucher_attr_manager
|
||||
(
|
||||
host_t host,
|
||||
@ -358,8 +354,7 @@ mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
__WATCHOS_PROHIBITED
|
||||
__TVOS_PROHIBITED
|
||||
__TVOS_PROHIBITED __WATCHOS_PROHIBITED
|
||||
kern_return_t host_set_atm_diagnostic_flag
|
||||
(
|
||||
host_t host,
|
||||
@ -372,8 +367,7 @@ mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
__WATCHOS_PROHIBITED
|
||||
__TVOS_PROHIBITED
|
||||
__TVOS_PROHIBITED __WATCHOS_PROHIBITED
|
||||
kern_return_t host_get_atm_diagnostic_flag
|
||||
(
|
||||
host_t host,
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/port.h>
|
||||
#include <mach/message.h>
|
||||
|
||||
/*
|
||||
* Mach Voucher - an immutable collection of attribute value handles.
|
||||
@ -212,7 +213,7 @@ typedef mach_port_t ipc_voucher_attr_control_t;
|
||||
* The private handle that the voucher attribute manager provides to
|
||||
* the mach voucher mechanism to represent a given attr content/value.
|
||||
*/
|
||||
typedef uint64_t mach_voucher_attr_value_handle_t;
|
||||
typedef uint64_t mach_voucher_attr_value_handle_t __kernel_ptr_semantics;
|
||||
typedef mach_voucher_attr_value_handle_t *mach_voucher_attr_value_handle_array_t;
|
||||
|
||||
typedef mach_msg_type_number_t mach_voucher_attr_value_handle_array_size_t;
|
||||
|
||||
1
lib/libc/include/any-macos-any/mach/mig.h
vendored
1
lib/libc/include/any-macos-any/mach/mig.h
vendored
@ -151,7 +151,6 @@ typedef struct mig_symtab {
|
||||
#define MIG_SERVER_ROUTINE
|
||||
#endif
|
||||
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Client side reply port allocate */
|
||||
|
||||
@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t;
|
||||
#define processor_MSG_COUNT 6
|
||||
#endif /* processor_MSG_COUNT */
|
||||
|
||||
#include <Availability.h>
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
|
||||
@ -44,6 +44,4 @@ typedef int sync_policy_t;
|
||||
#define SYNC_POLICY_LIFO (SYNC_POLICY_FIFO|SYNC_POLICY_REVERSED)
|
||||
|
||||
|
||||
#define SYNC_POLICY_MAX 0x7
|
||||
|
||||
#endif /* _MACH_SYNC_POLICY_H_ */
|
||||
@ -29,6 +29,9 @@
|
||||
#ifndef MACH_TASK_INSPECT_H
|
||||
#define MACH_TASK_INSPECT_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <mach/vm_types.h>
|
||||
|
||||
/*
|
||||
* XXX These interfaces are still in development -- they are subject to change
|
||||
* without notice.
|
||||
|
||||
@ -131,7 +131,11 @@ typedef struct thread_extended_policy *thread_extended_policy_t;
|
||||
*
|
||||
* computation: This is the nominal amount of computation
|
||||
* time needed during a separate processing arrival, specified
|
||||
* in absolute time units.
|
||||
* in absolute time units. The thread may be preempted after
|
||||
* the computation time has elapsed.
|
||||
* If (computation < constraint/2) it will be forced to
|
||||
* constraint/2 to avoid unintended preemption and associated
|
||||
* timer interrupts.
|
||||
*
|
||||
* constraint: This is the maximum amount of real time that
|
||||
* may elapse from the start of a separate processing arrival
|
||||
@ -139,11 +143,11 @@ typedef struct thread_extended_policy *thread_extended_policy_t;
|
||||
* specified in absolute time units. Must be (>= computation).
|
||||
* Note that latency = (constraint - computation).
|
||||
*
|
||||
* preemptible: This indicates that the computation may be
|
||||
* interrupted, subject to the constraint specified above.
|
||||
* preemptible: IGNORED (This indicates that the computation may be
|
||||
* interrupted, subject to the constraint specified above.)
|
||||
*/
|
||||
|
||||
#define THREAD_TIME_CONSTRAINT_POLICY 2
|
||||
#define THREAD_TIME_CONSTRAINT_POLICY 2
|
||||
|
||||
struct thread_time_constraint_policy {
|
||||
uint32_t period;
|
||||
|
||||
@ -32,7 +32,6 @@
|
||||
#include <Availability.h>
|
||||
#include <mach/mach.h>
|
||||
|
||||
#ifndef KERNEL
|
||||
/*
|
||||
* Gets all register values in the target thread with pointer-like contents.
|
||||
*
|
||||
@ -58,6 +57,5 @@
|
||||
__API_AVAILABLE(macosx(10.14), ios(12.0), tvos(9.0), watchos(5.0))
|
||||
kern_return_t thread_get_register_pointer_values(thread_t thread,
|
||||
uintptr_t *sp, size_t *length, uintptr_t *values);
|
||||
#endif
|
||||
|
||||
#endif /* _MACH_THREAD_STATE_H_ */
|
||||
@ -69,12 +69,51 @@
|
||||
#include <mach_debug/hash_info.h>
|
||||
#include <mach_debug/lockgroup_info.h>
|
||||
|
||||
#define MACH_CORE_FILEHEADER_SIGNATURE 0x0063614d20646152ULL
|
||||
#define MACH_CORE_FILEHEADER_SIGNATURE 0x0063614d20646152ULL
|
||||
#define MACH_CORE_FILEHEADER_V2_SIGNATURE 0x63614d2073736f42ULL
|
||||
#define MACH_CORE_FILEHEADER_MAXFILES 16
|
||||
#define MACH_CORE_FILEHEADER_NAMELEN 16
|
||||
|
||||
/* The following are defined for mach_core_fileheader_v2 */
|
||||
#define MACH_CORE_FILEHEADER_V2_FLAG_LOG_ENCRYPTED_AEA (1ULL << 0) /* The log is encrypted using AEA */
|
||||
#define MACH_CORE_FILEHEADER_V2_FLAG_EXISTING_COREFILE_KEY_FORMAT_NIST_P256 (1ULL << 8) /* The public key is an NIST-P256 ECC key */
|
||||
#define MACH_CORE_FILEHEADER_V2_FLAG_NEXT_COREFILE_KEY_FORMAT_NIST_P256 (1ULL << 16) /* The next public key is an NIST-P256 ECC key */
|
||||
|
||||
#define MACH_CORE_FILEHEADER_V2_FLAGS_EXISTING_COREFILE_KEY_FORMAT_MASK (0x1ULL << 8) /* A bit-mask for all supported key formats */
|
||||
#define MACH_CORE_FILEHEADER_V2_FLAGS_NEXT_COREFILE_KEY_FORMAT_MASK (0x1ULL << 16) /* A bit-mask for all supported next key formats */
|
||||
|
||||
#define MACH_CORE_FILEHEADER_V2_FLAGS_NEXT_KEY_FORMAT_TO_KEY_FORMAT(x) (((x) >> 8) & MACH_CORE_FILEHEADER_V2_FLAGS_EXISTING_COREFILE_KEY_FORMAT_MASK)
|
||||
|
||||
/* The following are defined for mach_core_details_v2 */
|
||||
#define MACH_CORE_DETAILS_V2_FLAG_ENCRYPTED_AEA (1ULL << 0) /* This core is encrypted using AEA */
|
||||
#define MACH_CORE_DETAILS_V2_FLAG_COMPRESSED_ZLIB (1ULL << 8) /* This core is compressed using ZLib */
|
||||
|
||||
typedef char symtab_name_t[32];
|
||||
|
||||
/*
|
||||
***********************
|
||||
*
|
||||
* Mach corefile layout
|
||||
*
|
||||
***********************
|
||||
*
|
||||
* uint64_t signature
|
||||
* uint64_t log_offset >---+
|
||||
* uint64_t log_length |
|
||||
* mach_core_details files[MACH_CORE_FILEHEADER_MAXFILES] |
|
||||
* |--> uint64_t gzip_offset >---+ |
|
||||
* | uint64_t gzip_length | |
|
||||
* | char core_name[] | |
|
||||
* |--> uint64_t gzip_offset >---+ | |
|
||||
* | uint64_t gzip_length | | |
|
||||
* | char core_name[] | | |
|
||||
* |--> [...] | | |
|
||||
* [log data. Plain-text] | | <---+
|
||||
* [core #1 data. Zlib compressed] | <---+
|
||||
* [core #2 data. Zlib compressed] <---+
|
||||
* [core #x data...]
|
||||
*/
|
||||
|
||||
struct mach_core_details {
|
||||
uint64_t gzip_offset;
|
||||
uint64_t gzip_length;
|
||||
@ -82,13 +121,78 @@ struct mach_core_details {
|
||||
};
|
||||
|
||||
struct mach_core_fileheader {
|
||||
uint64_t signature;
|
||||
uint64_t signature; /* MACH_CORE_FILEHEADER_SIGNATURE */
|
||||
uint64_t log_offset;
|
||||
uint64_t log_length;
|
||||
uint64_t num_files;
|
||||
struct mach_core_details files[MACH_CORE_FILEHEADER_MAXFILES];
|
||||
};
|
||||
|
||||
/*
|
||||
* Mach corefile V2 headers are denoted with MACH_CORE_FILEHEADER_V2_SIGNATURE.
|
||||
* Note that the V2 headers contain a version field that further indicates the version of the
|
||||
* header's contents. For example, if a V2 header's 'version' field indicates version 5, then
|
||||
* the header follows the format of the 'mach_core_fileheader_v5' structure.
|
||||
*
|
||||
* Further note that 'mach_core_details_' structures are not bound to the same versioning scheme
|
||||
* as the header itself. This means that it's perfectly acceptable for a 'mach_core_fileheader_v5' header
|
||||
* to make use of 'mach_core_details_v2'
|
||||
*
|
||||
**************************
|
||||
*
|
||||
* Mach corefile layout V2 (using a version 2 header struct as an example)
|
||||
*
|
||||
**************************
|
||||
*
|
||||
* uint64_t signature
|
||||
* uint32_t version
|
||||
* uint64_t flags
|
||||
* uint64_t pub_key_offset >---+
|
||||
* uint16_t pub_key_length |
|
||||
* uint64_t log_offset >---+ |
|
||||
* uint64_t log_length | |
|
||||
* uint64_t num_files | |
|
||||
* mach_core_details_v2 files[] | |
|
||||
* |--> uint64_t flags | |
|
||||
* | uint64_t offset >---+ | |
|
||||
* | uint64_t length | | |
|
||||
* | char core_name[] | | |
|
||||
* |--> uint64_t flags | | |
|
||||
* | uint64_t offset >---+ | | |
|
||||
* | uint64_t length | | | |
|
||||
* | char core_name[] | | | |
|
||||
* |--> [...] | | | |
|
||||
* [public key data] | | | <---+
|
||||
* [log data. Plain-text or an AEA container] | | <---+
|
||||
* [core #1 data. Zlib compressed. Possibly in an AEA container] | <---+
|
||||
* [core #2 data. Zlib compressed. Possibly in an AEA container] <---+
|
||||
* [core #x data...]
|
||||
*/
|
||||
|
||||
struct mach_core_details_v2 {
|
||||
uint64_t flags; /* See the MACH_CORE_DETAILS_V2_FLAG_* definitions */
|
||||
uint64_t offset;
|
||||
uint64_t length;
|
||||
char core_name[MACH_CORE_FILEHEADER_NAMELEN];
|
||||
};
|
||||
|
||||
struct mach_core_fileheader_base {
|
||||
uint64_t signature; /* MACH_CORE_FILEHEADER_V2_SIGNATURE */
|
||||
uint32_t version;
|
||||
};
|
||||
|
||||
struct mach_core_fileheader_v2 {
|
||||
uint64_t signature; /* MACH_CORE_FILEHEADER_V2_SIGNATURE */
|
||||
uint32_t version; /* 2 */
|
||||
uint64_t flags; /* See the MACH_CORE_FILEHEADER_V2_FLAG_* definitions */
|
||||
uint64_t pub_key_offset; /* Offset of the public key */
|
||||
uint16_t pub_key_length; /* Length of the public key */
|
||||
uint64_t log_offset;
|
||||
uint64_t log_length;
|
||||
uint64_t num_files;
|
||||
struct mach_core_details_v2 files[];
|
||||
};
|
||||
|
||||
#define KOBJECT_DESCRIPTION_LENGTH 512
|
||||
typedef char kobject_description_t[KOBJECT_DESCRIPTION_LENGTH];
|
||||
|
||||
|
||||
4
lib/libc/include/any-macos-any/net/net_kev.h
vendored
4
lib/libc/include/any-macos-any/net/net_kev.h
vendored
@ -74,7 +74,7 @@
|
||||
#define KEV_DL_LINK_QUALITY_METRIC_CHANGED 20
|
||||
#define KEV_DL_NODE_PRESENCE 21
|
||||
#define KEV_DL_NODE_ABSENCE 22
|
||||
#define KEV_DL_MASTER_ELECTED 23
|
||||
#define KEV_DL_PRIMARY_ELECTED 23
|
||||
#define KEV_DL_ISSUES 24
|
||||
#define KEV_DL_IFDELEGATE_CHANGED 25
|
||||
#define KEV_DL_AWDL_RESTRICTED 26
|
||||
@ -83,6 +83,8 @@
|
||||
#define KEV_DL_QOS_MODE_CHANGED 29
|
||||
#define KEV_DL_LOW_POWER_MODE_CHANGED 30
|
||||
|
||||
#define KEV_DL_MASTER_ELECTED (_Pragma("gcc warn Use KEV_DL_PRIMARY_ELECTED instead") KEV_DL_PRIMARY_ELECTED)
|
||||
|
||||
|
||||
#define KEV_INET6_SUBCLASS 6 /* inet6 subclass */
|
||||
/* KEV_INET6_SUBCLASS event codes */
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
#include <TargetConditionals.h>
|
||||
#include <objc/objc.h>
|
||||
|
||||
#if __LP64__ || 0 || NS_BUILD_32_LIKE_64
|
||||
#if __LP64__ || TARGET_OS_WIN32 || NS_BUILD_32_LIKE_64
|
||||
typedef long NSInteger;
|
||||
typedef unsigned long NSUInteger;
|
||||
#else
|
||||
|
||||
69
lib/libc/include/any-macos-any/objc/message.h
vendored
69
lib/libc/include/any-macos-any/objc/message.h
vendored
@ -316,73 +316,4 @@ _objc_msgForward_stret(id _Nonnull receiver, SEL _Nonnull sel, ...)
|
||||
OBJC_ARM64_UNAVAILABLE;
|
||||
#endif
|
||||
|
||||
|
||||
/* Variable-argument Messaging Primitives
|
||||
*
|
||||
* Use these functions to call methods with a list of arguments, such
|
||||
* as the one passed to forward:: .
|
||||
*
|
||||
* The contents of the argument list are architecture-specific.
|
||||
* Consult your local function call ABI documentation for details.
|
||||
*
|
||||
* These functions must be cast to an appropriate function pointer type
|
||||
* before being called, except for objc_msgSendv_stret() which must not
|
||||
* be cast to a struct-returning type.
|
||||
*/
|
||||
|
||||
typedef void* marg_list;
|
||||
|
||||
OBJC_EXPORT id _Nullable
|
||||
objc_msgSendv(id _Nullable self, SEL _Nonnull op, size_t arg_size,
|
||||
marg_list _Nonnull arg_frame)
|
||||
OBJC2_UNAVAILABLE;
|
||||
|
||||
OBJC_EXPORT void
|
||||
objc_msgSendv_stret(void * _Nonnull stretAddr, id _Nullable self,
|
||||
SEL _Nonnull op, size_t arg_size,
|
||||
marg_list _Nullable arg_frame)
|
||||
OBJC2_UNAVAILABLE;
|
||||
/* Note that objc_msgSendv_stret() does not return a structure type,
|
||||
* and should not be cast to do so. This is unlike objc_msgSend_stret()
|
||||
* and objc_msgSendSuper_stret().
|
||||
*/
|
||||
#if defined(__i386__)
|
||||
OBJC_EXPORT double
|
||||
objc_msgSendv_fpret(id _Nullable self, SEL _Nonnull op,
|
||||
unsigned arg_size, marg_list _Nullable arg_frame)
|
||||
OBJC2_UNAVAILABLE;
|
||||
#endif
|
||||
|
||||
|
||||
/* The following marg_list macros are of marginal utility. They
|
||||
* are included for compatibility with the old objc-class.h header. */
|
||||
|
||||
#if !__OBJC2__
|
||||
|
||||
#define marg_prearg_size 0
|
||||
|
||||
#define marg_malloc(margs, method) \
|
||||
do { \
|
||||
margs = (marg_list *)malloc (marg_prearg_size + ((7 + method_getSizeOfArguments(method)) & ~7)); \
|
||||
} while (0)
|
||||
|
||||
#define marg_free(margs) \
|
||||
do { \
|
||||
free(margs); \
|
||||
} while (0)
|
||||
|
||||
#define marg_adjustedOffset(method, offset) \
|
||||
(marg_prearg_size + offset)
|
||||
|
||||
#define marg_getRef(margs, offset, type) \
|
||||
( (type *)((char *)margs + marg_adjustedOffset(method,offset) ) )
|
||||
|
||||
#define marg_getValue(margs, offset, type) \
|
||||
( *marg_getRef(margs, offset, type) )
|
||||
|
||||
#define marg_setValue(margs, offset, type, value) \
|
||||
( marg_getValue(margs, offset, type) = (value) )
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@ -629,9 +629,6 @@ typedef int (*pthread_jit_write_callback_t)(void * _Nullable ctx);
|
||||
* On systems where pthread_jit_write_protect_supported_np(3) is false, this
|
||||
* function calls @callback directly and does nothing else.
|
||||
*
|
||||
* Only callbacks in libraries/images present at process start-up are allowed -
|
||||
* callbacks in images loaded dynamically via dlopen(3)/etc. are not permitted.
|
||||
*
|
||||
* This function only enforces that @callback is allowed if the caller has the
|
||||
* com.apple.security.cs.jit-write-allowlist entitlement. That entitlement also
|
||||
* disallows use of pthread_jit_write_protect_np(3). Adopting the entitlement
|
||||
@ -644,6 +641,14 @@ typedef int (*pthread_jit_write_callback_t)(void * _Nullable ctx);
|
||||
* libraries - once all libraries in an application have adopted, the
|
||||
* application should add the entitlement.
|
||||
*
|
||||
* By default, only callbacks in libraries/images present at process start-up
|
||||
* are allowed - callbacks in images loaded dynamically via dlopen(3)/etc. are
|
||||
* not permitted. However, if the additional entitlement
|
||||
* com.apple.security.cs.jit-write-allowlist-freeze-late is _also_ present, any
|
||||
* callbacks in dlopen'd libraries are also added to the set of allowed
|
||||
* callbacks until the {@link pthread_jit_write_freeze_callbacks_np} function is
|
||||
* called.
|
||||
*
|
||||
* The goal of this interface is to allow applications that execute JIT-compiled
|
||||
* code to mitigate against attempts from attackers to escalate to code
|
||||
* execution by getting their own instructions written to the MAP_JIT region.
|
||||
@ -665,6 +670,35 @@ __SWIFT_UNAVAILABLE_MSG("This interface cannot be safely used from Swift")
|
||||
int pthread_jit_write_with_callback_np(
|
||||
pthread_jit_write_callback_t _Nonnull callback, void * _Nullable ctx);
|
||||
|
||||
/*!
|
||||
* @function pthread_jit_write_freeze_callbacks_np
|
||||
*
|
||||
* @abstract
|
||||
* Freezes the set of allowed pthread JIT write callbacks, preventing any
|
||||
* callbacks in subsequently dlopen'd libraries from being allowed as arguments
|
||||
* to {@link pthread_jit_write_with_callback_np}
|
||||
*
|
||||
* @discussion
|
||||
* If the com.apple.security.cs.jit-write-allowlist-freeze-late entitlement is
|
||||
* present, this function must be called exactly once after all libraries
|
||||
* containing JIT write callbacks have been loaded to prevent any further
|
||||
* runtime modifications to the set of allowed callbacks. Failing to call this
|
||||
* function before calling pthread_jit_write_with_callback_np(3) for the first
|
||||
* time is an error, as is calling it multiple times.
|
||||
*
|
||||
* If the jit-write-allowlist-freeze-late entitlement is not present, calling
|
||||
* this function is an error.
|
||||
*
|
||||
* If an application does not need to dlopen(3) any libraries or frameworks
|
||||
* containing needed JIT write callbacks, it is best to avoid the
|
||||
* jit-write-allowlist-freeze-late entitlement and accompanying need to call
|
||||
* this function, as this allows the runtime to automatically freeze the set of
|
||||
* allowed callbacks early in process initialization.
|
||||
*/
|
||||
__API_AVAILABLE(macos(12.1))
|
||||
__API_UNAVAILABLE(ios, tvos, watchos, driverkit)
|
||||
void pthread_jit_write_freeze_callbacks_np(void);
|
||||
|
||||
/*!
|
||||
* @function pthread_cpu_number_np
|
||||
*
|
||||
9
lib/libc/include/any-macos-any/simd/base.h
vendored
9
lib/libc/include/any-macos-any/simd/base.h
vendored
@ -41,7 +41,14 @@
|
||||
* way in which simd functions are overloaded, the usual weak-linking tricks
|
||||
* do not work; these functions are simply unavailable when targeting older
|
||||
* versions of the library. */
|
||||
# if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_13 || \
|
||||
# if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_12_0 || \
|
||||
__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_15_0 || \
|
||||
__WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_8_0 || \
|
||||
__TV_OS_VERSION_MIN_REQUIRED >= __TVOS_15_0 || \
|
||||
__BRIDGE_OS_VERSION_MIN_REQUIRED >= 60000 || \
|
||||
__DRIVERKIT_VERSION_MIN_REQUIRED >= __DRIVERKIT_21_0
|
||||
# define SIMD_LIBRARY_VERSION 4
|
||||
# elif __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_13 || \
|
||||
__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_11_0 || \
|
||||
__WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_4_0 || \
|
||||
__TV_OS_VERSION_MIN_REQUIRED >= __TVOS_11_0 || \
|
||||
|
||||
31
lib/libc/include/any-macos-any/simd/matrix.h
vendored
31
lib/libc/include/any-macos-any/simd/matrix.h
vendored
@ -24,6 +24,10 @@
|
||||
*
|
||||
* simd_transpose(x) Transpose of the matrix x.
|
||||
*
|
||||
* simd_trace(x) Trace of the matrix x.
|
||||
*
|
||||
* simd_determinant(x) Determinant of the matrix x.
|
||||
*
|
||||
* simd_inverse(x) Inverse of x if x is non-singular. If
|
||||
* x is singular, the result is undefined.
|
||||
*
|
||||
@ -248,6 +252,14 @@ static simd_double4x3 SIMD_CFUNC simd_transpose(simd_double3x4 __x);
|
||||
static simd_double4x4 SIMD_CFUNC simd_transpose(simd_double4x4 __x);
|
||||
#define matrix_transpose simd_transpose
|
||||
|
||||
static float SIMD_CFUNC simd_trace(simd_float2x2 __x);
|
||||
static float SIMD_CFUNC simd_trace(simd_float3x3 __x);
|
||||
static float SIMD_CFUNC simd_trace(simd_float4x4 __x);
|
||||
static double SIMD_CFUNC simd_trace(simd_double2x2 __x);
|
||||
static double SIMD_CFUNC simd_trace(simd_double3x3 __x);
|
||||
static double SIMD_CFUNC simd_trace(simd_double4x4 __x);
|
||||
#define matrix_trace simd_trace
|
||||
|
||||
static float SIMD_CFUNC simd_determinant(simd_float2x2 __x);
|
||||
static float SIMD_CFUNC simd_determinant(simd_float3x3 __x);
|
||||
static float SIMD_CFUNC simd_determinant(simd_float4x4 __x);
|
||||
@ -468,7 +480,11 @@ namespace simd {
|
||||
static SIMD_CPPFUNC float4x2 transpose(const float2x4 x) { return ::simd_transpose(x); }
|
||||
static SIMD_CPPFUNC float4x3 transpose(const float3x4 x) { return ::simd_transpose(x); }
|
||||
static SIMD_CPPFUNC float4x4 transpose(const float4x4 x) { return ::simd_transpose(x); }
|
||||
|
||||
|
||||
static SIMD_CPPFUNC float trace(const float2x2 x) { return ::simd_trace(x); }
|
||||
static SIMD_CPPFUNC float trace(const float3x3 x) { return ::simd_trace(x); }
|
||||
static SIMD_CPPFUNC float trace(const float4x4 x) { return ::simd_trace(x); }
|
||||
|
||||
static SIMD_CPPFUNC float determinant(const float2x2 x) { return ::simd_determinant(x); }
|
||||
static SIMD_CPPFUNC float determinant(const float3x3 x) { return ::simd_determinant(x); }
|
||||
static SIMD_CPPFUNC float determinant(const float4x4 x) { return ::simd_determinant(x); }
|
||||
@ -656,7 +672,11 @@ namespace simd {
|
||||
static SIMD_CPPFUNC double4x2 transpose(const double2x4 x) { return ::simd_transpose(x); }
|
||||
static SIMD_CPPFUNC double4x3 transpose(const double3x4 x) { return ::simd_transpose(x); }
|
||||
static SIMD_CPPFUNC double4x4 transpose(const double4x4 x) { return ::simd_transpose(x); }
|
||||
|
||||
|
||||
static SIMD_CPPFUNC double trace(const double2x2 x) { return ::simd_trace(x); }
|
||||
static SIMD_CPPFUNC double trace(const double3x3 x) { return ::simd_trace(x); }
|
||||
static SIMD_CPPFUNC double trace(const double4x4 x) { return ::simd_trace(x); }
|
||||
|
||||
static SIMD_CPPFUNC double determinant(const double2x2 x) { return ::simd_determinant(x); }
|
||||
static SIMD_CPPFUNC double determinant(const double3x3 x) { return ::simd_determinant(x); }
|
||||
static SIMD_CPPFUNC double determinant(const double4x4 x) { return ::simd_determinant(x); }
|
||||
@ -1292,6 +1312,13 @@ static simd_double4 SIMD_CFUNC __rotate1(simd_double4 __x) { return __builtin_sh
|
||||
static simd_double4 SIMD_CFUNC __rotate2(simd_double4 __x) { return __builtin_shufflevector(__x,__x,2,3,0,1); }
|
||||
static simd_double4 SIMD_CFUNC __rotate3(simd_double4 __x) { return __builtin_shufflevector(__x,__x,3,0,1,2); }
|
||||
|
||||
static float SIMD_CFUNC simd_trace( simd_float2x2 __x) { return __x.columns[0][0] + __x.columns[1][1]; }
|
||||
static double SIMD_CFUNC simd_trace(simd_double2x2 __x) { return __x.columns[0][0] + __x.columns[1][1]; }
|
||||
static float SIMD_CFUNC simd_trace( simd_float3x3 __x) { return __x.columns[0][0] + __x.columns[1][1] + __x.columns[2][2]; }
|
||||
static double SIMD_CFUNC simd_trace(simd_double3x3 __x) { return __x.columns[0][0] + __x.columns[1][1] + __x.columns[2][2]; }
|
||||
static float SIMD_CFUNC simd_trace( simd_float4x4 __x) { return __x.columns[0][0] + __x.columns[1][1] + __x.columns[2][2] + __x.columns[3][3]; }
|
||||
static double SIMD_CFUNC simd_trace(simd_double4x4 __x) { return __x.columns[0][0] + __x.columns[1][1] + __x.columns[2][2] + __x.columns[3][3]; }
|
||||
|
||||
static float SIMD_CFUNC simd_determinant( simd_float2x2 __x) { return __x.columns[0][0]*__x.columns[1][1] - __x.columns[0][1]*__x.columns[1][0]; }
|
||||
static double SIMD_CFUNC simd_determinant(simd_double2x2 __x) { return __x.columns[0][0]*__x.columns[1][1] - __x.columns[0][1]*__x.columns[1][0]; }
|
||||
static float SIMD_CFUNC simd_determinant( simd_float3x3 __x) { return simd_reduce_add(__x.columns[0]*(__rotate1(__x.columns[1])*__rotate2(__x.columns[2]) - __rotate2(__x.columns[1])*__rotate1(__x.columns[2]))); }
|
||||
|
||||
229
lib/libc/include/any-macos-any/simd/matrix_types.h
vendored
229
lib/libc/include/any-macos-any/simd/matrix_types.h
vendored
@ -30,6 +30,7 @@
|
||||
#define SIMD_MATRIX_TYPES_HEADER
|
||||
|
||||
#include <simd/types.h>
|
||||
#include <simd/vector_make.h>
|
||||
#if SIMD_COMPILER_HAS_REQUIRED_FEATURES
|
||||
|
||||
/* Matrix types available in C, Objective-C, and C++ */
|
||||
@ -258,6 +259,234 @@ namespace simd {
|
||||
double4x4(::simd_quatd q) : ::simd_double4x4(::simd_matrix4x4(q)) { }
|
||||
#endif
|
||||
};
|
||||
|
||||
/*! @abstract Templated Matrix struct based on scalar type and number of columns and rows. */
|
||||
template <typename ScalarType, size_t col, size_t row> struct Matrix {
|
||||
// static const size_t col
|
||||
// static const size_t row
|
||||
// typedef scalar_t
|
||||
// typedef type
|
||||
};
|
||||
/*! @abstract Helper type to access the simd type easily. */
|
||||
template <typename ScalarType, size_t col, size_t row>
|
||||
using Matrix_t = typename Matrix<ScalarType, col, row>::type;
|
||||
|
||||
template<> struct Matrix<float, 2, 2> {
|
||||
static const size_t col = 2;
|
||||
static const size_t row = 2;
|
||||
typedef float scalar_t;
|
||||
typedef float2x2 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<float, 3, 2> {
|
||||
static const size_t col = 3;
|
||||
static const size_t row = 2;
|
||||
typedef float scalar_t;
|
||||
typedef float3x2 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<float, 4, 2> {
|
||||
static const size_t col = 4;
|
||||
static const size_t row = 2;
|
||||
typedef float scalar_t;
|
||||
typedef float4x2 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<float, 2, 3> {
|
||||
static const size_t col = 2;
|
||||
static const size_t row = 3;
|
||||
typedef float scalar_t;
|
||||
typedef float2x3 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<float, 3, 3> {
|
||||
static const size_t col = 3;
|
||||
static const size_t row = 3;
|
||||
typedef float scalar_t;
|
||||
typedef float3x3 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<float, 4, 3> {
|
||||
static const size_t col = 4;
|
||||
static const size_t row = 3;
|
||||
typedef float scalar_t;
|
||||
typedef float4x3 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<float, 2, 4> {
|
||||
static const size_t col = 2;
|
||||
static const size_t row = 4;
|
||||
typedef float scalar_t;
|
||||
typedef float2x4 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<float, 3, 4> {
|
||||
static const size_t col = 3;
|
||||
static const size_t row = 4;
|
||||
typedef float scalar_t;
|
||||
typedef float3x4 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<float, 4, 4> {
|
||||
static const size_t col = 4;
|
||||
static const size_t row = 4;
|
||||
typedef float scalar_t;
|
||||
typedef float4x4 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<double, 2, 2> {
|
||||
static const size_t col = 2;
|
||||
static const size_t row = 2;
|
||||
typedef double scalar_t;
|
||||
typedef double2x2 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<double, 3, 2> {
|
||||
static const size_t col = 3;
|
||||
static const size_t row = 2;
|
||||
typedef double scalar_t;
|
||||
typedef double3x2 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<double, 4, 2> {
|
||||
static const size_t col = 4;
|
||||
static const size_t row = 2;
|
||||
typedef double scalar_t;
|
||||
typedef double4x2 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<double, 2, 3> {
|
||||
static const size_t col = 2;
|
||||
static const size_t row = 3;
|
||||
typedef double scalar_t;
|
||||
typedef double2x3 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<double, 3, 3> {
|
||||
static const size_t col = 3;
|
||||
static const size_t row = 3;
|
||||
typedef double scalar_t;
|
||||
typedef double3x3 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<double, 4, 3> {
|
||||
static const size_t col = 4;
|
||||
static const size_t row = 3;
|
||||
typedef double scalar_t;
|
||||
typedef double4x3 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<double, 2, 4> {
|
||||
static const size_t col = 2;
|
||||
static const size_t row = 4;
|
||||
typedef double scalar_t;
|
||||
typedef double2x4 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<double, 3, 4> {
|
||||
static const size_t col = 3;
|
||||
static const size_t row = 4;
|
||||
typedef double scalar_t;
|
||||
typedef double3x4 type;
|
||||
};
|
||||
|
||||
template<> struct Matrix<double, 4, 4> {
|
||||
static const size_t col = 4;
|
||||
static const size_t row = 4;
|
||||
typedef double scalar_t;
|
||||
typedef double4x4 type;
|
||||
};
|
||||
|
||||
template <> struct get_traits<float2x2>
|
||||
{
|
||||
using type = Matrix<float, 2, 2>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<float3x2>
|
||||
{
|
||||
using type = Matrix<float, 3, 2>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<float4x2>
|
||||
{
|
||||
using type = Matrix<float, 4, 2>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<float2x3>
|
||||
{
|
||||
using type = Matrix<float, 2, 3>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<float3x3>
|
||||
{
|
||||
using type = Matrix<float, 3, 3>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<float4x3>
|
||||
{
|
||||
using type = Matrix<float, 4, 3>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<float2x4>
|
||||
{
|
||||
using type = Matrix<float, 2, 4>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<float3x4>
|
||||
{
|
||||
using type = Matrix<float, 3, 4>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<float4x4>
|
||||
{
|
||||
using type = Matrix<float, 4, 4>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<double2x2>
|
||||
{
|
||||
using type = Matrix<double, 2, 2>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<double3x2>
|
||||
{
|
||||
using type = Matrix<double, 3, 2>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<double4x2>
|
||||
{
|
||||
using type = Matrix<double, 4, 2>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<double2x3>
|
||||
{
|
||||
using type = Matrix<double, 2, 3>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<double3x3>
|
||||
{
|
||||
using type = Matrix<double, 3, 3>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<double4x3>
|
||||
{
|
||||
using type = Matrix<double, 4, 3>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<double2x4>
|
||||
{
|
||||
using type = Matrix<double, 2, 4>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<double3x4>
|
||||
{
|
||||
using type = Matrix<double, 3, 4>;
|
||||
};
|
||||
|
||||
template <> struct get_traits<double4x4>
|
||||
{
|
||||
using type = Matrix<double, 4, 4>;
|
||||
};
|
||||
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */
|
||||
|
||||
1106
lib/libc/include/any-macos-any/simd/vector_make.h
vendored
1106
lib/libc/include/any-macos-any/simd/vector_make.h
vendored
File diff suppressed because it is too large
Load Diff
@ -27,5 +27,11 @@
|
||||
*/
|
||||
#ifndef _UINTPTR_T
|
||||
#define _UINTPTR_T
|
||||
|
||||
#ifndef __has_attribute
|
||||
typedef unsigned long uintptr_t;
|
||||
#else
|
||||
typedef unsigned long uintptr_t;
|
||||
#endif /* __has_attribute */
|
||||
|
||||
#endif /* _UINTPTR_T */
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2007 Apple Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2017 Apple Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
*
|
||||
@ -26,15 +26,28 @@
|
||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
*/
|
||||
|
||||
#ifndef _MACH_MACHINE_THREAD_STATE_H_
|
||||
#define _MACH_MACHINE_THREAD_STATE_H_
|
||||
#ifndef _SYS_CLONEFILE_H_
|
||||
#define _SYS_CLONEFILE_H_
|
||||
|
||||
#if defined (__i386__) || defined(__x86_64__)
|
||||
#include "mach/i386/thread_state.h"
|
||||
#elif defined (__arm__) || defined (__arm64__)
|
||||
#include "mach/arm/thread_state.h"
|
||||
#else
|
||||
#error architecture not supported
|
||||
#endif
|
||||
/* Options for clonefile calls */
|
||||
#define CLONE_NOFOLLOW 0x0001 /* Don't follow symbolic links */
|
||||
#define CLONE_NOOWNERCOPY 0x0002 /* Don't copy ownership information from source */
|
||||
|
||||
#endif /* _MACH_MACHINE_THREAD_STATE_H_ */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <machine/_types.h>
|
||||
#include <_types/_uint32_t.h>
|
||||
#include <Availability.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
int clonefileat(int, const char *, int, const char *, uint32_t) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
|
||||
|
||||
int fclonefileat(int, int, const char *, uint32_t) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
|
||||
|
||||
int clonefile(const char *, const char *, uint32_t) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
#endif /* _SYS_CLONEFILE_H_ */
|
||||
2
lib/libc/include/any-macos-any/sys/ioctl.h
vendored
2
lib/libc/include/any-macos-any/sys/ioctl.h
vendored
@ -107,4 +107,4 @@ __END_DECLS
|
||||
*/
|
||||
#if defined(USE_OLD_TTY) || defined(BSD_KERNEL_PRIVATE)
|
||||
#include <sys/ioctl_compat.h>
|
||||
#endif /* !_SYS_IOCTL_H_ */
|
||||
#endif /* defined(USE_OLD_TTY) || defined(BSD_KERNEL_PRIVATE) */
|
||||
5
lib/libc/include/any-macos-any/sys/random.h
vendored
5
lib/libc/include/any-macos-any/sys/random.h
vendored
@ -29,12 +29,13 @@
|
||||
#ifndef __SYS_RANDOM_H__
|
||||
#define __SYS_RANDOM_H__
|
||||
|
||||
#include <Availability.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/appleapiopts.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
|
||||
int getentropy(void* buffer, size_t size);
|
||||
int getentropy(void* buffer, size_t size) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
|
||||
__END_DECLS
|
||||
|
||||
#endif /* __SYS_RANDOM_H__ */
|
||||
2
lib/libc/include/any-macos-any/sys/ttycom.h
vendored
2
lib/libc/include/any-macos-any/sys/ttycom.h
vendored
@ -139,7 +139,7 @@ struct winsize {
|
||||
#define TIOCMBIS _IOW('t', 108, int) /* bis modem bits */
|
||||
#define TIOCMBIC _IOW('t', 107, int) /* bic modem bits */
|
||||
#define TIOCMGET _IOR('t', 106, int) /* get all modem bits */
|
||||
#define TIOCREMOTE _IOW('t', 105, int) /* remote input editing */
|
||||
/* 105 unused */
|
||||
#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */
|
||||
#define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */
|
||||
#define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */
|
||||
|
||||
4
lib/libc/include/any-macos-any/unistd.h
vendored
4
lib/libc/include/any-macos-any/unistd.h
vendored
@ -599,6 +599,10 @@ void sync(void);
|
||||
int truncate(const char *, off_t);
|
||||
useconds_t ualarm(useconds_t, useconds_t);
|
||||
int usleep(useconds_t) __DARWIN_ALIAS_C(usleep);
|
||||
|
||||
#if !defined(_POSIX_C_SOURCE)
|
||||
__deprecated_msg("Use posix_spawn or fork")
|
||||
#endif
|
||||
pid_t vfork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
|
||||
/* End XSI */
|
||||
|
||||
|
||||
1
lib/libc/include/any-macos-any/uuid/uuid.h
vendored
1
lib/libc/include/any-macos-any/uuid/uuid.h
vendored
@ -62,7 +62,6 @@ void uuid_generate(uuid_t out);
|
||||
void uuid_generate_random(uuid_t out);
|
||||
void uuid_generate_time(uuid_t out);
|
||||
|
||||
void uuid_generate_early_random(uuid_t out);
|
||||
|
||||
int uuid_is_null(const uuid_t uu);
|
||||
|
||||
|
||||
14
lib/libc/include/any-macos-any/xpc/activity.h
vendored
14
lib/libc/include/any-macos-any/xpc/activity.h
vendored
@ -164,6 +164,20 @@ __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0)
|
||||
XPC_EXPORT
|
||||
const char * const XPC_ACTIVITY_REQUIRE_SCREEN_SLEEP; // bool
|
||||
|
||||
/*!
|
||||
* @constant XPC_ACTIVITY_PREVENT_DEVICE_SLEEP
|
||||
* A Boolean value indicating whether the activity should prevent system sleep while
|
||||
* running on battery.
|
||||
* If this property is set, the activity scheduler will take the appropriate power
|
||||
* assertion to keep the device (but not the screen) awake while the activity is running.
|
||||
* Only activities which perform critical system functions that do not want to be
|
||||
* interrupted by system sleep should set this.
|
||||
* Setting this property can impact battery life.
|
||||
*/
|
||||
__API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0))
|
||||
XPC_EXPORT
|
||||
const char * const XPC_ACTIVITY_PREVENT_DEVICE_SLEEP; // bool
|
||||
|
||||
/*!
|
||||
* @constant XPC_ACTIVITY_REQUIRE_BATTERY_LEVEL
|
||||
* An integer percentage of minimum battery charge required to allow the
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
#ifdef __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
|
||||
/* compiler sets __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ when -mtvos-version-min is used */
|
||||
#define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
|
||||
#define __TV_OS_VERSION_MAX_ALLOWED __TVOS_14_5
|
||||
#define __TV_OS_VERSION_MAX_ALLOWED __TVOS_15_2
|
||||
/* for compatibility with existing code. New code should use platform specific checks */
|
||||
#define __IPHONE_OS_VERSION_MIN_REQUIRED 90000
|
||||
#endif
|
||||
@ -65,7 +65,7 @@
|
||||
#ifdef __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
|
||||
/* compiler sets __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ when -mwatchos-version-min is used */
|
||||
#define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
|
||||
#define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_7_4
|
||||
#define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_8_3
|
||||
/* for compatibility with existing code. New code should use platform specific checks */
|
||||
#define __IPHONE_OS_VERSION_MIN_REQUIRED 90000
|
||||
#endif
|
||||
@ -75,7 +75,7 @@
|
||||
#ifdef __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__
|
||||
|
||||
#define __BRIDGE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__
|
||||
#define __BRIDGE_OS_VERSION_MAX_ALLOWED 50300
|
||||
#define __BRIDGE_OS_VERSION_MAX_ALLOWED 60100
|
||||
/* for compatibility with existing code. New code should use platform specific checks */
|
||||
#define __IPHONE_OS_VERSION_MIN_REQUIRED 110000
|
||||
#endif
|
||||
@ -90,14 +90,14 @@
|
||||
#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
|
||||
/* make sure a default max version is set */
|
||||
#ifndef __MAC_OS_X_VERSION_MAX_ALLOWED
|
||||
#define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_11_3
|
||||
#define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_12_1
|
||||
#endif
|
||||
#endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
|
||||
|
||||
#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED
|
||||
/* make sure a default max version is set */
|
||||
#ifndef __IPHONE_OS_VERSION_MAX_ALLOWED
|
||||
#define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_14_5
|
||||
#define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_15_2
|
||||
#endif
|
||||
/* make sure a valid min is set */
|
||||
#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_2_0
|
||||
|
||||
4015
lib/libc/include/any-macos.11-any/AvailabilityMacros.h
vendored
4015
lib/libc/include/any-macos.11-any/AvailabilityMacros.h
vendored
File diff suppressed because it is too large
Load Diff
@ -60,6 +60,11 @@
|
||||
#define __MAC_11_0 110000
|
||||
#define __MAC_11_1 110100
|
||||
#define __MAC_11_3 110300
|
||||
#define __MAC_11_4 110400
|
||||
#define __MAC_11_5 110500
|
||||
#define __MAC_11_6 110600
|
||||
#define __MAC_12_0 120000
|
||||
#define __MAC_12_1 120100
|
||||
/* __MAC_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */
|
||||
|
||||
#define __IPHONE_2_0 20000
|
||||
@ -114,6 +119,12 @@
|
||||
#define __IPHONE_14_2 140200
|
||||
#define __IPHONE_14_3 140300
|
||||
#define __IPHONE_14_5 140500
|
||||
#define __IPHONE_14_6 140600
|
||||
#define __IPHONE_14_7 140700
|
||||
#define __IPHONE_14_8 140800
|
||||
#define __IPHONE_15_0 150000
|
||||
#define __IPHONE_15_1 150100
|
||||
#define __IPHONE_15_2 150200
|
||||
/* __IPHONE_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */
|
||||
|
||||
#define __TVOS_9_0 90000
|
||||
@ -142,6 +153,11 @@
|
||||
#define __TVOS_14_2 140200
|
||||
#define __TVOS_14_3 140300
|
||||
#define __TVOS_14_5 140500
|
||||
#define __TVOS_14_6 140600
|
||||
#define __TVOS_14_7 140700
|
||||
#define __TVOS_15_0 150000
|
||||
#define __TVOS_15_1 150100
|
||||
#define __TVOS_15_2 150200
|
||||
|
||||
#define __WATCHOS_1_0 10000
|
||||
#define __WATCHOS_2_0 20000
|
||||
@ -167,6 +183,12 @@
|
||||
#define __WATCHOS_7_2 70200
|
||||
#define __WATCHOS_7_3 70300
|
||||
#define __WATCHOS_7_4 70400
|
||||
#define __WATCHOS_7_5 70500
|
||||
#define __WATCHOS_7_6 70600
|
||||
#define __WATCHOS_8_0 80000
|
||||
#define __WATCHOS_8_1 80100
|
||||
#define __WATCHOS_8_3 80300
|
||||
|
||||
|
||||
/*
|
||||
* Set up standard Mac OS X versions
|
||||
@ -207,10 +229,12 @@
|
||||
#define MAC_OS_X_VERSION_10_15_1 101501
|
||||
#define MAC_OS_X_VERSION_10_16 101600
|
||||
#define MAC_OS_VERSION_11_0 110000
|
||||
#define MAC_OS_VERSION_12_0 120000
|
||||
|
||||
#endif /* #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) */
|
||||
|
||||
#define __DRIVERKIT_19_0 190000
|
||||
#define __DRIVERKIT_20_0 200000
|
||||
#define __DRIVERKIT_21_0 210000
|
||||
|
||||
#endif /* __AVAILABILITY_VERSIONS__ */
|
||||
@ -61,8 +61,10 @@
|
||||
* The IOS/TV/WATCH conditionals are mutually exclusive.
|
||||
*
|
||||
*
|
||||
* TARGET_OS_WIN32 - Generated code will run under 32-bit Windows
|
||||
* TARGET_OS_WIN32 - Generated code will run under WIN32 API
|
||||
* TARGET_OS_WINDOWS - Generated code will run under Windows
|
||||
* TARGET_OS_UNIX - Generated code will run under some Unix (not OSX)
|
||||
* TARGET_OS_LINUX - Generated code will run under Linux
|
||||
* TARGET_OS_MAC - Generated code will run under Mac OS X variant
|
||||
* TARGET_OS_OSX - Generated code will run under OS X devices
|
||||
* TARGET_OS_IPHONE - Generated code for firmware, devices, or simulator
|
||||
@ -178,7 +180,7 @@
|
||||
/* -target=x86_64-apple-driverkit19.0 */
|
||||
/* -target=arm64-apple-driverkit19.0 */
|
||||
/* -target=arm64e-apple-driverkit19.0 */
|
||||
#if (__is_target_arch(x86_64) || __is_target_arch(arm64) || __is_target_arch(arm64e)) && __is_target_vendor(apple) && __is_target_os(driverkit)
|
||||
#if __is_target_vendor(apple) && __is_target_os(driverkit)
|
||||
#define TARGET_OS_OSX 0
|
||||
#define TARGET_OS_IPHONE 0
|
||||
#define TARGET_OS_IOS 0
|
||||
@ -214,7 +216,9 @@
|
||||
#if defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__) )
|
||||
#define TARGET_OS_MAC 1
|
||||
#define TARGET_OS_WIN32 0
|
||||
#define TARGET_OS_WINDOWS 0
|
||||
#define TARGET_OS_UNIX 0
|
||||
#define TARGET_OS_LINUX 0
|
||||
|
||||
#if !DYNAMIC_TARGETS_ENABLED
|
||||
#define TARGET_OS_OSX 1
|
||||
@ -355,7 +359,9 @@
|
||||
#elif defined(__MWERKS__)
|
||||
#define TARGET_OS_MAC 1
|
||||
#define TARGET_OS_WIN32 0
|
||||
#define TARGET_OS_WINDOWS 0
|
||||
#define TARGET_OS_UNIX 0
|
||||
#define TARGET_OS_LINUX 0
|
||||
#define TARGET_OS_EMBEDDED 0
|
||||
#if defined(__POWERPC__)
|
||||
#define TARGET_CPU_PPC 1
|
||||
@ -481,7 +487,9 @@
|
||||
#endif
|
||||
#define TARGET_OS_MAC 1
|
||||
#define TARGET_OS_WIN32 0
|
||||
#define TARGET_OS_WINDOWS 0
|
||||
#define TARGET_OS_UNIX 0
|
||||
#define TARGET_OS_LINUX 0
|
||||
#define TARGET_OS_EMBEDDED 0
|
||||
#if TARGET_CPU_PPC || TARGET_CPU_PPC64
|
||||
#define TARGET_RT_BIG_ENDIAN 1
|
||||
|
||||
@ -480,7 +480,7 @@ DISPATCH_EXPORT DISPATCH_NONNULL3 DISPATCH_NOTHROW
|
||||
void
|
||||
dispatch_apply(size_t iterations,
|
||||
dispatch_queue_t DISPATCH_APPLY_QUEUE_ARG_NULLABILITY queue,
|
||||
DISPATCH_NOESCAPE void (^block)(size_t));
|
||||
DISPATCH_NOESCAPE void (^block)(size_t iteration));
|
||||
#endif
|
||||
|
||||
/*!
|
||||
@ -515,7 +515,7 @@ DISPATCH_EXPORT DISPATCH_NONNULL4 DISPATCH_NOTHROW
|
||||
void
|
||||
dispatch_apply_f(size_t iterations,
|
||||
dispatch_queue_t DISPATCH_APPLY_QUEUE_ARG_NULLABILITY queue,
|
||||
void *_Nullable context, void (*work)(void *_Nullable, size_t));
|
||||
void *_Nullable context, void (*work)(void *_Nullable context, size_t iteration));
|
||||
|
||||
/*!
|
||||
* @function dispatch_get_current_queue
|
||||
|
||||
@ -1274,6 +1274,8 @@ struct build_tool_version {
|
||||
#define PLATFORM_WATCHOSSIMULATOR 9
|
||||
#define PLATFORM_DRIVERKIT 10
|
||||
|
||||
|
||||
|
||||
/* Known values for the tool field above. */
|
||||
#define TOOL_CLANG 1
|
||||
#define TOOL_SWIFT 2
|
||||
@ -1456,6 +1458,8 @@ struct dyld_info_command {
|
||||
#define EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION 0x04
|
||||
#define EXPORT_SYMBOL_FLAGS_REEXPORT 0x08
|
||||
#define EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER 0x10
|
||||
#define EXPORT_SYMBOL_FLAGS_STATIC_RESOLVER 0x20
|
||||
|
||||
|
||||
/*
|
||||
* The linker_option_command contains linker options embedded in object files.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user